Enabling Shortcodes for X Theme Top Bar

By default the X Theme does not include shortcode support for their topbar display element. In order to add shortcode support, you need to create a child theme, and place this new code in the _topbar.php file. This fix isn’t Memberium specific and will enable all shortcodes for the top bar.

Hat tip to John Cook for the code snippet.

<?php

// ============================================================================= 
// VIEWS/GLOBAL/_TOPBAR.PHP 
// ----------------------------------------------------------------------------- 
// Includes topbar output. 
// =============================================================================

?>

<?php if ( x_get_option( 'x_topbar_display', '' ) == '1' ) : ?>

<div class="x-topbar"> 
<div class="x-topbar-inner x-container max width"> 
<?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> 
<?php $get_topbar_content = x_get_option( 'x_topbar_content' ); ?> 
<p class="p-info"><?php echo do_shortcode($get_topbar_content); ?></p> 
<?php endif; ?> 
<?php x_social_global(); ?> 
</div> 
</div>

<?php endif; ?>
  • Was this Helpful?
  • YesNo
9 ways to add more value to your membership site

Table of Contents

Keep Reading

How to Add Editor and Author Users when using Memberium

When it comes to a membership site, apart from having admin and subscriber users, you might also need to add users with editor and author roles. Editors, for example can help you with managing content on the site and they don’t need to be on the CRM. In this short guide, you’ll learn how you can add editor, author, contributor users to your WordPress site running on Memberium.

Read More »

Want to get some fresh ideas on how you can improve your membership site or course?

Download our free ebook!

Book a Call

Welcome to Memberium!

We are very excited for you to be part of our family. 

We would love to answer any questions that you have!

Please choose the best time for you to get in a call with us. 

For Technical Support, you can contact us at https://keap.memberium.com/support/ or Email us at support@memberium.com.