Archived topic
navigation under the post image
12 replies · Started by panorade on April 8, 2018
I have the post image on the whole width and would like to have the navigation under the picture
is it possible to do the navigation under the post picture
Thanks achim
Hi there,
Not sure if I understand.
Can you link me to the site in question?
You can edit the original topic and use the private URL field.
Let me know :)

Navigation over the Post-Image

Navigation under the Post-Image
i have see ther is a Choise to ake the Nav under , over the Header and left or right, and i want under the post-image
if it possible
i hope you understand what i mean is it the Post-Image
Thanks
Is that a featured image or page header?
Do you only want that on single posts?
It'd be great if you can link me to your site.
is the featured image
and some time is cool to have the Navigation under the featured image
but not all times
It would be nice if you can change this manually
http://hirsch-chemnitz.de/hyundai-santa-fe/
Thanks for Helping me
Achim
Hmm you would need to do something like this: https://generatepress.com/forums/topic/page-header-image-above-menu/#post-288568
However that will do it to all featured images/navigation unless you manually set page conditional tag:
https://docs.generatepress.com/article/using-hooks-conditional-tags/#static-pages
https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page
Let me know if this helps.
hi when i use this
add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
}
Then for all pages the image under the Navigation
But i want only use it for the Home (front) Page
but this dont work
add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
if ( is_front_page () ) {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
}
}
i use v1.62
Thanks for help Achim
Can you try this:
add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
if ( is_front_page () ) {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 29 );
}
}
Hi Thanks but your code dont work
here
https://hirsch-chemnitz.de/
but when i remove the
if ( is_front_page () )
then is works perfect for all pages
MFG Achim
That code should work, so something with the Site is interfering with that being a static home page.
You could try targeting the page by it's ID with if ( is_page(#) ) just add the relevant page id.
Thanks for help but is not work
This i use
add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
if ( is_page (118) ) {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 29 );
}
}
you can see here
https://hirsch-chemnitz.de/
Aah sorry my bad - conditionals won't work on a function that is run after theme set up. As it doesn't know the page thats loaded.
Bare with me....
OK, so give this a shot:
function craig_move_navigation() {
if ( is_front_page () ) {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 29 );
}
}
add_action( 'template_redirect', 'craig_move_navigation' );