Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Undefined variable $post in homepage/templates/top-stories.php #1728

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ though this project doesn't succeed in adhering to [Semantic Versioning](https:/
- Fixes a `ReferenceError` in navigation menu JavaScript. [Pull request #1715](https:/INN/largo/pull/1715) for [issue #1714](https:/INN/largo/issues/1714).
- Fixes an undefined variable error in certain edge cases of the site `og:description` and `description` meta tags. [Pull request #1724](https:/INN/largo/pull/1724) for [issue #1721](https:/INN/largo/issues/1721).
- Co-Authors Plus profile field descriptions no longer contain escaped HTML. [Pull request #1726](https:/INN/largo/pull/1726) for [issue #1720](https:/INN/largo/issues/1720).
- Fixes multiple `Undefined variable: post` errors in `homepage/templates/top-stories.php`. [Pull request #1728](https:/INN/largo/pull/1728) for [issue #1723](https:/INN/largo/issues/1723).

## [Largo 0.6.3](https:/INN/largo/compare/v0.6.2...v0.6.3)

Expand Down
4 changes: 2 additions & 2 deletions homepages/templates/top-stories.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'large' ); ?></a>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<h5 class="byline"><?php largo_byline( true, false, get_the_ID() ); ?></h5>
<?php largo_excerpt( $post, 4 ); ?>
<?php largo_excerpt( get_post(), 4 ); ?>
<?php if ( largo_post_in_series() ):
$feature = largo_get_the_main_feature();
$feature_posts = largo_get_recent_posts_for_term( $feature, 1, 1 );
Expand Down Expand Up @@ -70,7 +70,7 @@
} ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<?php largo_excerpt( $post, 3 ); ?>
<?php largo_excerpt( get_post(), 3 ); ?>
</div>
<?php elseif ( $count == 4 ) : ?>
<h4 class="subhead"><?php _e('More Headlines', 'largo'); ?></h4>
Expand Down