Archived topic
move post navigation to top of posts above title
9 replies · Started by Katie on July 18, 2021
Is it possible to move post navigation to the top of the post, above the post title?
Rather than this (current) at bottom:
<post name
>post name
I would like this
<post name post name>
current post title
Hi Katie,
Any chance you can link us to the site in question?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Absolutely. The navigation I'm referring to is on the individual posts.
My blog has been around forever (2006) and I'm trying to keep the change minimal = at least as far as navigation is concerned.
thanks.
Try Tom's snippet here with a hook element:
https://generatepress.com/forums/topic/move-the-location-of-post-navigation/#post-832302
https://docs.generatepress.com/article/hooks-element-overview/
The before_entry_title hook should work.
Make sure to check to execute PHP.
Let me know if this helps :)
No - it didn't work or I didn't do it correctly.
I will admit to being clueless about this.
This is what I entered in the box:
<?php
if ( function_exists( 'before_entry_title ' ) ) {
generate_content_nav( 'nav-below' );
}
?>
I checked execute PHP, single page, all users
I also tried entire site and blog rather than single page.
What I am looking for is "<previous post name" on the left side of the post and "next post name>" on the right side.
If I can't move them above the title is it possible to put them on one line?
A lot of my readers are not tech-savy and need things to be stated clearly....
Hi there,
you can create your own Post Navigation using a Block Element - Post Navigation:
https://docs.generatepress.com/article/block-element-post-navigation/
Which will allow you to display the post titles and add set the Hook for where they are to be displayed.
That is exactly what I need, thanks.
I have a suggestion: the video was very helpful, but if there was a simple post navigation example done first, without the image (which obscured info) I could have done what I needed in half the time.
Thanks for your help - I am now totally happy.
Glad to hear that!
Point noted - there are some prebuilt templates in the Block Element :)
I saw them - but I wanted something very simple.
And I rarely use templates of any sort - unless I make them. 😎
I just don't have that kind of time anymore....
I think the first time you use the method it takes a little getting used to. But i hope the next time will be a lot quicker :)