Site logo

[Support request] I want to hook a HTML logo into the navigation on mobile

Home Forums Support [Support request] I want to hook a HTML logo into the navigation on mobile

Home Forums Support I want to hook a HTML logo into the navigation on mobile

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1823471
    Streater

    I created my logo in custom HTML (class = mobile-logo-row) in the header widget and want to hook it into my mobile menu… with I assume the container (generate_before_header_content).

    I tried a bunch of hook ideas… this one seemed the most logical but didn’t work. Any ideas?

    <?php
    add_action(‘generate_before_header_content’, function(){
    do_action (‘mobile-logo-row’);}
    );
    
    ?>
    #1823558
    Leo
    Staff
    Customer Support

    Hi there,

    I wonder if there is a better way to go about this.

    What exactly are you trying to achieve?

    Can you link me to the page in question?

    #1824121
    Streater

    Yes, there are multiple reasons why I want to place the logo with HMTL instead of using the default logo customizer.
    1) My desktop logo settings are coded on an HTML sidebar and have separate settings… and I don’t want to use display: none to go about removing the default logo on desktop.
    2) I want to add image sizing in HTML
    3) I want to add target=”_blank”(which doesn’t seem to be working for any links on the site but that is a different topic) and add
    4) AND I want to do a fixed header and it will only be possible doing this according to this thread: https://generatepress.com/forums/topic/change-logo-media-source-file-when-sticky/#post-304545

    In private information (do links show for you here???): I provided link to my working GeneratePress site and you can see exactly how I want things to look and act on my original site built in DIVI

    #1824764
    Elvin
    Staff
    Customer Support

    Hi there,

    If it’s solely for replicating the layout of the DIVI site you’ve provided on mobile, you can just enable Mobile header on Appearance > Customize > Layout > Header and set its own logo from there.

    But if you really must change where the logo is placed, simply remove the logo you’ve assigned on customizer’s site identity and use Tom’s code on the link you’ve found.

    #1825314
    Streater

    Oh thanks… that Header Customizer works but how do I add a home page link to that? That’s what I wanted to do with HTML…

    #1825324
    Streater

    Oh wait just noticed it linked as a default. Works perfect thanks!

    #1826013
    Elvin
    Staff
    Customer Support

    No problem. Glad you got it sorted. 😀

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