Hello!
I’m trying to add a global block in header, but it’s not translating to the content; it just stays as a shortcode.
This is the code I’m using.
jQuery(document).ready(function($){
$('<div class="icons">[cs_gb name="social-media-icons"]</div>').insertAfter('a.x-brand');
});
And I’ve also added this code in functions.php to allow shortcodes in header.
add_filter(‘x_option_x_topbar_content’, ‘top_bar_content_shortcode’);
function top_bar_content_shortcode ( $content ) {
return do_shortcode ( $content );
}