Skip to content

Commit

Permalink
Merge pull request #1709 from INN/1445-update-homepage-get_term_by-ca…
Browse files Browse the repository at this point in the history
…lls-to-use-slug

Updated `largo_home_single_top` function
  • Loading branch information
Josh Darby committed May 20, 2019
2 parents 16c2721 + 9c349a0 commit 1f4cecf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ though this project doesn't succeed in adhering to [Semantic Versioning](https:/
## [Largo 0.6.4](https://github.com/INN/largo/compare/v0.6.3...v0.6.4)

## Fixes and minor improvements

- Updated `largo_home_single_top` function to get `homepage_feature_term` and `top_story_term` values from slug
instead of by name. If these prominence names were updated to anything else, ``homepage_feature_term`` and `top_story_term` would be false and fallback to `__('Homepage Featured', 'largo')`. [Pull request #1709](https://github.com/INN/largo/pull/1709) for [issue #1445](https://github.com/INN/largo/issues/1445).
- Removed separator span on search results page to be able to put the search result url on a new line instead of next to the date. Also added `overflow-wrap: breakword;` to result url
to make sure it doesn't overflow from results container. [Pull request #1710](https://github.com/INN/largo/pull/1710) for [issue #1509](https://github.com/INN/largo/issues/1509).

Expand Down
4 changes: 2 additions & 2 deletions homepages/homepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ function largo_home_single_top() {
$big_story = null;

// Cache the terms
$homepage_feature_term = get_term_by( 'name', __('Homepage Featured', 'largo'), 'prominence' );
$top_story_term = get_term_by( 'name', __('Homepage Top Story', 'largo'), 'prominence' );
$homepage_feature_term = get_term_by( 'slug', 'homepage-featured', 'prominence' );
$top_story_term = get_term_by( 'slug', 'top-story', 'prominence' );

// Get the posts that are both in 'Homepage Featured' and 'Homepage Top Story'
$top_story_posts = get_posts(array(
Expand Down

0 comments on commit 1f4cecf

Please sign in to comment.