- This topic has 1 reply, 2 voices, and was last updated 8 years, 8 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Community Forums › Epik Theme Support › genesis_after_post or genesis_after_post_content not executing?
Hello,
I am working on displaying a “Previous” and “Next” link at the end of each post.
http://farmonplate.com/2013/10/17/whole-roasted-snapper/
My problem is, I have to use the genesis_before_comments to show this. I would like to do this instead by using genesis_after_post_content. But when I do this, the function doesn’t fire. What gives?
My current code is, which works fine:
add_action( ‘genesis_before_comments’, ‘eo_prev_next_post_nav’ );
function eo_prev_next_post_nav() {
if ( is_single() ) {
echo ‘<div class=”prev-next-navigation”>’;
previous_post_link( ‘<div class=”previous”>Previous Recipe: %link</div>’, ‘%title’ );
next_post_link( ‘<div class=”next”>Next Recipe: %link</div>’, ‘%title’ );
echo ‘</div><!– .prev-next-navigation –>’;
}
}
It’s probably because you’re using the XHTML version of the code with an HTML5 theme. Check SP’s hook list for the newer version of this code – http://my.studiopress.com/docs/hook-reference/ and disregard the ones labeled (XHTML)
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com