Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Support request] navigation under the post image

Home Forums Support [Support request] navigation under the post image

Home Forums Support navigation under the post image

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #544273
    panorade

    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

    GeneratePress 2.0.2
    GP Premium 1.6.2
    #544553
    Leo
    Staff
    Customer Support

    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 🙂

    #545002
    panorade

    Image under the Navigation
    Navigation over the Post-Image

    Image over the Navigation
    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

    #545376
    Leo
    Staff
    Customer Support

    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.

    #546079
    panorade

    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

    #546436
    Leo
    Staff
    Customer Support

    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.

    #632938
    panorade

    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

    #633331
    Leo
    Staff
    Customer Support

    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 );
        }
    }
    #633759
    panorade

    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

    #633864
    David
    Staff
    Customer Support

    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.

    #633985
    panorade

    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/

    #634000
    David
    Staff
    Customer Support

    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….

    #634001
    David
    Staff
    Customer Support

    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' );
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.