- This topic has 12 replies, 3 voices, and was last updated 5 years, 8 months ago by David.
-
AuthorPosts
-
April 8, 2018 at 1:33 am #544273panorade
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 achimApril 8, 2018 at 8:43 am #544553LeoStaffCustomer SupportHi 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 🙂
April 9, 2018 at 1:05 am #545002panorade
Navigation over the Post-Image
Navigation under the Post-Imagei 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
ThanksApril 9, 2018 at 8:23 am #545376LeoStaffCustomer SupportIs 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.
April 10, 2018 at 2:27 am #546079panoradeis 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 manuallyhttp://hirsch-chemnitz.de/hyundai-santa-fe/
Thanks for Helping me
AchimApril 10, 2018 at 8:49 am #546436LeoStaffCustomer SupportHmm 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_PageLet me know if this helps.
July 25, 2018 at 11:45 pm #632938panoradehi 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 workadd_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 AchimJuly 26, 2018 at 9:13 am #633331LeoStaffCustomer SupportCan 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 ); } }
July 26, 2018 at 11:36 pm #633759panoradeHi 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 pagesMFG Achim
July 27, 2018 at 3:27 am #633864DavidStaffCustomer SupportThat 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 withif ( is_page(#) )
just add the relevant page id.July 27, 2018 at 6:58 am #633985panoradeThanks 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/July 27, 2018 at 7:16 am #634000DavidStaffCustomer SupportAah 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….
July 27, 2018 at 7:20 am #634001DavidStaffCustomer SupportOK, 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' );
-
AuthorPosts
- You must be logged in to reply to this topic.