Tagged: x
-
AuthorPosts
-
June 7, 2016 at 11:51 am #1030244
GDBEParticipantHi 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 28Now 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!June 7, 2016 at 11:52 am #1030246
GDBEParticipantThis reply has been marked as private.June 7, 2016 at 6:37 pm #1030861
JadeModeratorHi 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.
June 8, 2016 at 11:03 am #1032139
GDBEParticipantNo 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,
June 8, 2016 at 4:43 pm #1032712
FriechModeratorHi There,
You can add this under Custom > CSS in the Customizer.
.x-logobar .logobar-widget-area { display: none; }Hope it helps, Cheers!
June 9, 2016 at 8:40 am #1033989
GDBEParticipantI 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?
June 9, 2016 at 11:38 am #1034286
RupokMemberHi 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!
June 10, 2016 at 9:17 am #1035906
GDBEParticipantPERFECT- THANK YOU!
June 10, 2016 at 1:20 pm #1036223
JoaoModeratorGreat to hear it.
Let us know if you need help with anything else.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1030244 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
