Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1030244
    GDBE
    Participant

    Hi I am using the stacked static logo setup and I have also added a new widget area to the right of the logo using this code:

    add_action('x_after_view_global__brand', function(){ 
    
    echo '<div class="logobar-widget-area">';
    dynamic_sidebar( "logobar-sidebar" );
    echo '</div><style>.logobar-widget-area { float: right; }</style>';
    
    });
    
    register_sidebar( array(
    	'name'          => __( 'Logobar Widget Placement' ),
    	'id'            => "logobar-sidebar",
    	'description'   => '',
    	'class'         => '',
    	'before_widget' => '<div id="%1$s" class="widget %2$s">',
    	'after_widget'  => "</div>",
    	'before_title'  => '<h3 class="widgettitle">',
    	'after_title'   => "</h3>"
    ) );

    Then my client wanted the logo to stay at the top as you scroll down, so I found this code to add to my child theme navbar.php file

       <?php 
      x_get_view( 'global', '_brand' ); 
    ?> 
            

    right before the line of code <?php x_get_view( 'global', '_nav', 'primary' ); ?> on line 28

    Now the new widget area is being outputted twice. How can I amend the code to make the stacked logo static while keeping my new widget area?
    Thank you!

    #1030246
    GDBE
    Participant
    This reply has been marked as private.
    #1030861
    Jade
    Moderator

    Hi there,

    I have just checked the site and it seems that you have it already sorted since the widget doesn’t seem to be outputted twice anymore. Kindly let us know if it is otherwise.

    #1032139
    GDBE
    Participant

    No I just removed the code from the navbar.php file to make the logo static with the navbar. I will add it back in and you will see what I mean. Thanks,

    #1032712
    Friech
    Moderator

    Hi There,

    You can add this under Custom > CSS in the Customizer.

    .x-logobar .logobar-widget-area  {
    	display: none;
    }

    Hope it helps, Cheers!

    #1033989
    GDBE
    Participant

    I hid one of them, but not the right one. The one I want to keep is the one is the widget area, that is why I created that widget area 🙂 Any way to hide the one showing up in the navbar instead?

    #1034286
    Rupok
    Member

    Hi there,

    Thanks for updating. Yes you can hide the other one using this code :

    .x-navbar .logobar-widget-area {
      display: none;
    }

    Hope this helps.

    Cheers!

    #1035906
    GDBE
    Participant

    PERFECT- THANK YOU!

    #1036223
    Joao
    Moderator

    Great to hear it.

    Let us know if you need help with anything else.

    Joao

  • <script> jQuery(function($){ $("#no-reply-1030244 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>