MOVE ULTIMATE BRANDING HEADER CONTENT BELOW NAVIGATION MENU

Hi there,
I have ultimate branding / header content installed but the content is going above my main navigation menu. Is there an easy way to get the nav menu back to the top?
Any help appreciated,
Colin

  • Predrag Dubajic
    • Support

    Hey Colin,

    Ultimate Branding adds the code as the first thing inside body tag and there's no way reorder this from the UB settings itself.

    We could try using some jquery script to move it below the menu but before I check what would be best code to go with can you tell me if the below screenshot is what you want accomplished so we don't end up doing wrong change :slight_smile:

    Best regards,
    Predrag

  • Dimitris
    • Support Star

    Hello Colin,

    hope everything's going well for you! :slight_smile:

    I was inspecting your site and I came up with a CSS solution. Please notice that the only change I have made so far, is that I used a <div> tag to wrap your Global Header Content in order to target it through the CSS code (#ub-header-content).
    The actual CSS snippet isn't embedded anywhere, feel free to use it as you wish and let me know if this works for you. :wink:

    #ub-header-content {
        margin-top: 50px;
    }
    #masthead {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        padding: 5px 0 15px 0;
    }
    body.admin-bar #masthead {
        top: 32px;
    }

    Warm regards,
    Dimitris

  • Colin
    • Site Builder, Child of Zeus

    Hi Dimitris,
    Many thanks for your help.
    It has got the menu to the top, however it now overlays the UB header and my large navigation buttons are not clickable - the click/hover is above the button.
    Any ideas?

    Regards
    Colin

  • Dimitris
    • Support Star

    Hey there Colin,

    I hope you're doing well today! :slight_smile:

    I just inspected your site again and I was actually unable to make this work with CSS, so I took another path with jQuery. :slight_smile:
    Follows a little snippet which you can use either inside your child-theme or in a MU plugin

    <?php
    // Move Ultimate Branding Header Content before content
    add_action( 'wp_footer', 'ub_prepend');
    function ub_prepend() {
    echo "<script type='text/javascript'>
      jQuery(function($) {
        var item = $('#ub-header-content');
        $('#content').prepend(item);
      });
      </script>";
    }

    I'm waiting for your responce on this, I hope to get that right this time! :slight_smile:

    Have a good one,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.