Site logo

[Resolved] How to keep main-title with sticky menu

Home Forums Support [Resolved] How to keep main-title with sticky menu

Home Forums Support How to keep main-title with sticky menu

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2433445
    david

    Hi,
    How to keep main-title with sticky menu and how center menu and items social

    #2433646
    David
    Staff
    Customer Support

    Hi there,

    can i see the site you’re working on?

    #2438795
    david

    off course here is the link :

    http://diesety.cluster031.hosting.ovh.net/

    I would like the sticky menu to be like the start menu

    #2438944
    David
    Staff
    Customer Support

    OK, lets get the title in there first. As its not a built in option we need to do some shenanigans:

    1. You will need to add a Logo image to the Customizer > Layout > Sticky Nav.

    2. Add this PHP Snippet to your site:

    
    add_filter( 'generate_sticky_navigation_logo_output', function() {
        return sprintf(
            '<%1$s class="main-title" itemprop="headline">
                <a href="%2$s" rel="home">
                    %3$s
                </a>
            </%1$s>',
            ( is_front_page() && is_home() ) ? 'h1' : 'p',
            esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
            get_bloginfo( 'name' )
        );
    } );

    It will replace the fake logo with the site title.

    Once thats there let me know and ill review your CSS for centering the menu

    #2439276
    david

    Hello,
    Thank you for your reply. I pasted the code with Code Snippets. it doesn’t seem to work.
    Thanks

    #2439431
    David
    Staff
    Customer Support

    Did you add the logo to the Customizer > Layout > Sticky Nav ? It just needs an image in there.

    #2441424
    david

    it works thank you very much !

    #2441480
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.