From b5f37fbd6aa6334b444593e9d2e99c287486723e Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 17 Dec 2018 13:30:49 -0500 Subject: [PATCH 1/8] Display excerpt and other social media on is_singular() posts --- inc/open-graph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/open-graph.php b/inc/open-graph.php index 6451b4e91..05786dd06 100644 --- a/inc/open-graph.php +++ b/inc/open-graph.php @@ -31,7 +31,7 @@ function largo_opengraph() { ?> Date: Mon, 17 Dec 2018 13:31:31 -0500 Subject: [PATCH 2/8] Remove duplicate site title from og:title on non-is_singular non-is_archive non-is_front_page pages --- inc/open-graph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/open-graph.php b/inc/open-graph.php index 05786dd06..8b1e2fde8 100644 --- a/inc/open-graph.php +++ b/inc/open-graph.php @@ -58,7 +58,7 @@ function largo_opengraph() { - + Date: Mon, 17 Dec 2018 13:32:17 -0500 Subject: [PATCH 3/8] Add is_singular thumbnail to social media for non-is_single pages --- inc/open-graph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/open-graph.php b/inc/open-graph.php index 8b1e2fde8..1503e5d78 100644 --- a/inc/open-graph.php +++ b/inc/open-graph.php @@ -12,7 +12,7 @@ function largo_opengraph() { global $post; // set a default thumbnail, if a post has a featured image use that instead - if ( is_single() && has_post_thumbnail( $post->ID ) ) { + if ( is_singular() && has_post_thumbnail( $post->ID ) ) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $thumbnailURL = $image[0]; } else if ( of_get_option( 'logo_thumbnail_sq' ) ) { From cba6e6519cf2d1448fdbecb032a211be0bcd3d88 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 17 Dec 2018 13:49:56 -0500 Subject: [PATCH 4/8] Remove "results for ''" text on Google Custom Search Engine search page with an empty query For https://github.com/INN/largo/issues/1603 --- search.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/search.php b/search.php index 410e6c744..ef9df47d0 100644 --- a/search.php +++ b/search.php @@ -9,7 +9,15 @@

%s', 'largo'), get_search_query() ); + $search_query = esc_html( get_search_query() ); + if ( empty( $search_query ) ) { + echo wp_kses_post( __('Search:', 'largo') ); + } else { + echo wp_kses_post( sprintf( + __('Search results for %s', 'largo'), + $search_query + ) ); + } ?>

From b1fa8c4fd9be8be068874e9c707ab69536be9124 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 17 Dec 2018 13:50:48 -0500 Subject: [PATCH 5/8] Remove search form from global nav when on search page. --- partials/nav-global.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/partials/nav-global.php b/partials/nav-global.php index c5920f613..0bf975e68 100644 --- a/partials/nav-global.php +++ b/partials/nav-global.php @@ -40,17 +40,22 @@ - - From 642003d7f8ca2f54cbfb9c5487ef40c1fafa2c3a Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 17 Dec 2018 13:57:08 -0500 Subject: [PATCH 6/8] Remove inconsistent : from GCSE search header on no-result page --- search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.php b/search.php index ef9df47d0..4afecf45f 100644 --- a/search.php +++ b/search.php @@ -11,7 +11,7 @@ %s', 'largo'), From 473d535c818a47fdf0c1b011159eb2d50c3c7e81 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 17 Dec 2018 13:57:18 -0500 Subject: [PATCH 7/8] Changelog for https://github.com/INN/largo/pull/1604 --- changelog.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 2d05a7866..9e8ab2412 100644 --- a/changelog.md +++ b/changelog.md @@ -7,13 +7,20 @@ though this project doesn't succeed in adhering to [Semantic Versioning](https:/ ## [Largo 0.6.2](https://github.com/INN/largo/compare/v0.6.1...0.5-dev) +This release contains bug fixes for Largo 0.6. + ### Fixes - Fixes a regression in the behavior of the Largo Follow widget. [Pull request #1600](https://github.com/INN/largo/pull/1600) for [issue #1599](https://github.com/INN/largo/issues/1599). +- Fixes issue where post excerpt and featured media were not being used for open graph tags on post types that are `is_singular()` but not `is_single()`. [Pull request #1604)(https://github.com/INN/largo/pull/1604) for [issue #1602](https://github.com/INN/largo/issues/1602). +- Removes duplicate site title in opengraph tags for non-archive, non-`is_front_page()`, non-`is_singular()` URLs. [Pull request #1604](https://github.com/INN/largo/pull/1604) for [issue #1602](https://github.com/INN/largo/issues/1602). +- Removes search form from global nav bar when on the search page, so that there's only one search form. [Pull request #1604](https://github.com/INN/largo/pull/1604). +- Cleans up the search page when no query has been entered. [Pull request #1604](https://github.com/INN/largo/pull/1604) for [issue #1603](https://github.com/INN/largo/issues/1603). + ## [Largo 0.6.1](https://github.com/INN/largo/compare/v0.6...v0.6.1) -This release contains bugfixes for Largo 0.6. +This release contains bug fixes for Largo 0.6. ### Changes From 2c9ae6621e147c89736b049122f426da9a64e441 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 17 Dec 2018 14:10:46 -0500 Subject: [PATCH 8/8] Add upgrade notice to 0.6.2 for partials/nav-global.php --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 9e8ab2412..c32b57aac 100644 --- a/changelog.md +++ b/changelog.md @@ -17,6 +17,10 @@ This release contains bug fixes for Largo 0.6. - Removes search form from global nav bar when on the search page, so that there's only one search form. [Pull request #1604](https://github.com/INN/largo/pull/1604). - Cleans up the search page when no query has been entered. [Pull request #1604](https://github.com/INN/largo/pull/1604) for [issue #1603](https://github.com/INN/largo/issues/1603). +### Upgrade notices + +- If you have a custom `partials/nav-global.php` you may want to copy the `if ( ! is_search() ) { ... }` logic from [pull request #1604](https://github.com/INN/largo/pull/1604/) to reduce user confusion about which search form to use. + ## [Largo 0.6.1](https://github.com/INN/largo/compare/v0.6...v0.6.1)