Community Forums › Forums › Archived Forums › Design Tips and Tricks › Previous and Next post fields are not displaying in single post
Tagged: post navigation
- This topic has 4 replies, 4 voices, and was last updated 10 years, 2 months ago by
Susan.
-
AuthorPosts
-
March 21, 2016 at 8:44 am #181970
rajkumarsm
MemberHi Everyone,
I have added the following function in my functions.phpfunction ja_prev_next_post_nav() { if ( is_singular( 'post' ) ) { echo '<div class="prev-next-navigation">'; previous_post_link( '<div class="previous"> %link </div>', '<<  %title' ); next_post_link( '<div class="next"> %link</div>', '%title >> ' ); echo '</div>'; } } add_action( 'genesis_before_comments', 'ja_prev_next_post_nav' );And added some css for looking. It worked very well in my local system. I transferred both functions.php and style.css through ftp and verified in my site http://www.softwaretestingmaterial.com
The same is not working in my site. I have looked in view source. But no such code in view source.
In local system, my code is displaying after this</footer>
</article>
Where as in my site disquss code is displaying after
</footer>
</article>
For your kind information, I am not using disquss comments system in my local system.
Please help me to resolve this..
Thanks in advance everyone.
Rajkumar SM
http://www.softwaretestingmaterial.com
http://www.softwaretestingmaterial.comMarch 21, 2016 at 9:23 am #181974Victor Font
ModeratorCan you clean up the code and get rid of the HTML entities so it is readable?
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?March 21, 2016 at 10:39 am #181981rajkumarsm
MemberSorry, the code which I added in functions.php mentioned below
function ja_prev_next_post_nav() { if ( is_singular( 'post' ) ) { echo '<div class="prev-next-navigation">'; previous_post_link( '<div class="previous"> %link </div>', '<< %title' ); next_post_link( '<div class="next"> %link</div>', '%title >> ' ); echo '</div>'; } } add_action( 'genesis_before_comments', 'ja_prev_next_post_nav' );Thanks
Rajkumar SM
http://www.softwaretestingmaterial.comMarch 23, 2016 at 12:52 am #182077Brad Dalton
ParticipantMarch 23, 2016 at 7:26 am #182091Susan
ModeratorClosing this, as it is a duplicate of this: Is this the same question http://www.studiopress.community/topic/previous-and-next-post-fields-are-not-displaying-in-single-post-2/
-
AuthorPosts
- The topic ‘Previous and Next post fields are not displaying in single post’ is closed to new replies.