Hi Guys
I installed the gym demo site but the header is not built with the pro header builder, So I have recreated it as best as I can in the pro header builder.
The problem is when I add a widget and assign it’s no longer wrapped in the cool CSS that makes it look good.
So I inspected element and found this
<a href="#" id="x-btn-widgetbar" class="x-btn-widgetbar collapsed" data-x-toggle="collapse-b" data-x-toggleable="x-widgetbar" aria-expanded="false" aria-controls="x-widgetbar" role="button" style="outline: none;">
<i class="x-icon-plus-circle" data-x-icon-s=""><span class="visually-hidden">Toggle the Widgetbar</span></i>
</a>
So I just added a raw html element and added the code there to get it working,
How should I get this working via the widget element please? I tried adding x-btn-widgetbar to the class attribute to the widget but it took no effect.
Now that I have the widget working for logged out users that’s great.
So I made a header for the logged-in user by adding the following script to my functions.php file
<?php
add_filter(‘cs_match_header_assignment’, ‘custom_search_header’);
function custom_search_header($match) {
if (is_user_logged_in()) {
$match = 205; // the post ID for your header
}
return $match;
Then right clicked the "edit header button and copied target address and pasted the url to the address bare to see the heders ID and changed the “$match = 205; // the post ID for your header” to suit.
Now that I am logged in I see the Other header, I added the same html to a “raw content” for the widget as I did for the Logged out user header, however the widget now appears in the pro header builder editor but it does not show in the live site.
Do I need to adjust the html used for the logged-in user header?
Hope you can help
Thanks
Ben