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

HTTP Post not going through / Timeout related error message

If you come across an HTTP POST error message like org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 5000 ms, it is most likely that your hosting provider is blocking any posts from Infusionsoft because their IP address appears on certain web spam bot lists.

Read More »

18 Ways You Can Protect Your Membership Content with Memberium

In this article, you’ll learn 18 different methods you can use to protect or grant access to your membership site content using Memberium. At the end of this article, you will have learned how you can protect pages, posts, custom post types, portions of pages, documents, videos, audio files, and content categories.

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.