Tagged: x
-
AuthorPosts
-
December 26, 2016 at 2:12 am #1304354
jdiaz1302ParticipantHey there, I’ve been trying to use different shortcodes in the topbar, I didn’t give mucho importance until now that I would really love to use icon shortcodes there.
Is there any setting or workaround to accomplish that?
December 26, 2016 at 2:14 am #1304355
Rue NelModeratorHello There,
Thanks for writing in! By default, the topbar content only accepts text. If you want to insert a shortcode, we need to override the default. Because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
After the child theme is set up, please add the following code in your child theme’s functions.php file
// Allow shortcodes in the topbar content // ============================================================================= function allow_custom_shortcodes($contents) { $contents = do_shortcode($contents); return $contents; } add_filter('x_option_x_topbar_content', 'allow_custom_shortcodes'); // =============================================================================We would loved to know if this has work for you. Thank you.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1304354 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
