[Resolved] site title instead on logo on mobile heder

Home Forums Support [Resolved] site title instead on logo on mobile heder

Home Forums Support site title instead on logo on mobile heder

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #252687
    Daniel

    Hi Tom,

    Can You please instruct me how do I replace mobile header logo to present site title and site tag line insted?

    I have access to theme files, and know css so I can do later design adjustments.

    just need your help with file location and function that will replace current logic that allows only logo upload and presentation on header mobile

    Thanks,
    Daniel.T

    #252767
    Tom
    Lead Developer
    Lead Developer

    Hi Daniel,

    You can use the generate_inside_mobile_header hook:

    add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
    function tu_mobile_header_html() { ?>
        <div class="mobile-header-content">
            Your site title etc..
        </div>
    <?php }

    Then style it:

    .mobile-header-content {
        float: left; /* etc.. */
    }

    Hope this helps πŸ™‚

    #252928
    Daniel

    thanks for the hook it helped πŸ™‚

    #253045
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #255702
    Mathias

    Hello,

    where do I enter this code-snippet?

    add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
    function tu_mobile_header_html() { ?>
        <div class="mobile-header-content">
            Your site title etc..
        </div>
    <?php }
    #255705
    Mathias

    Hello Tom,

    I also would like the site title and the menu toggle in one line with the site title floating left and the menu toggle button floating right (hamburger menu).

    See my site: upconversion.de

    How can I achieve it?
    thanks

    #255714
    Tom
    Lead Developer
    Lead Developer

    This should help: https://generatepress.com/knowledgebase/adding-php-functions/

    Adding the float:left CSS mentioned above should do that for you πŸ™‚

    #453108
    CRISTO

    It says add to place the code in “generate_inside_mobile_header hook” I don’t see that as an option in GP hooks. Am I looking in the wrong place?

    #453290
    Leo
    Staff
    Customer Support
    #453347
    CRISTO

    Add it where?

    #453387
    Leo
    Staff
    Customer Support
    #453398
    CRISTO

    I did it…sort of. Text is black whereas I wanted white, so just need to know how to change the text color. Here is my site.

    #453410
    Leo
    Staff
    Customer Support

    Nicely done!

    Now we can just add the color to the current CSS you have:

    .mobile-header-content {
        float: left;
        color: #ffffff;
    }
    #453444
    CRISTO

    Fantastic….thanks Leo. Worked out just like I wanted.

    #453445
    CRISTO

    Of course if you could make it jump around, change colors, etc. JUST KIDDING!

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