Collapsible Widgetbar x Topbar

I need help, please. I can add widget in the collapsible Widgetbar.
however I’d like to include a widget in the topbar and I’m not sure how.

Hi there,

Regretfully this isn’t a feature offered by X as the topbar content is not meant to contain widget due to its limited space. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

Thanks for understanding. Take care!

Wow! I was surprised of such a special theme not performing such a basic function. The Plugin I use has a user account menu that works from a widget. The function Widgets> Header1 was eliminated

I find this. I try but can’t…

First navigate to Appearance > Sidebars, create a new sidebar, do not enable this sidebar on any page, and take note of the sidebar ID.

Then navigate to Appearance > Widgets, you should see the newly created sidebar there for you to place some widget.

To call your sidebar on the topbar. Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

Then on your child theme navigate to this directory: \x-child\framework\views\global\ from there create a new file named _topbar.php and paste the code below in it.

<?php // ============================================================================= // VIEWS/GLOBAL/_TOPBAR.PHP // ----------------------------------------------------------------------------- // Includes topbar output. // ============================================================================= ?> <?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?>
<?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>

<?php echo x_get_option( 'x_topbar_content' ); ?>

<?php if ( is_active_sidebar( 'YOUR CREATED SIDEBAR ID HERE' ) ) : ?> <?php dynamic_sidebar( 'YOUR CREATED SIDEBAR ID HERE' ); ?> <?php endif; ?> <?php endif; ?> <?php x_social_global(); ?>
<?php endif; ?>

Replace the YOUR CREATED SIDEBAR ID HERE with your actual sidebar ID, then save.

Provide us your site URL for applying CSS.

Hope it helps, Cheers!

Hey @mottafx,

Sorry for the confusion. I believe Jade thought that you want to add a Widget to the Topbar and make the Topbar collapsible which is really not possible.

I’ve reviewed your posts again and what I understand is, you only want to add a widget area to the header. Is that correct?

If so, you’re in the right track because you’re using Pro which has a Header Builder. In case you don’t know how to use it yet, please watch the video introduction at https://theme.co/apex/forum/t/pro-header-and-footer-builder-introduction/103

Once you know how to use the builder, you can add a Widget Area element to the header bar. For more details, about the Widget Area element, please see https://theme.co/apex/forum/t/elements-widget-area/10243/1

On the subject of widgets and in case you don’t know yet, our theme allows the creation of unlimited widget areas or sidebars which you can use to hold the third party plugin’s widget. See https://theme.co/apex/forum/t/features-unlimited-sidebars/95

Hope that helps.

Wow ! This theme is always amazing !
Tanks Christian !

On behalf of my colleague, you’re welcome. Cheers! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.