custom module - calling a shortcode

Hi,

I’m trying to create a custom module that takes a users content, and wraps it in a shortcode (from another plugin).

In the frontend.php i have:
<?php echo do_shortcode('[my_shortcode id="12332123" description="description goes here"]' . $settings->user_content . '[/my_shortcode]'); ?>

but all it is showing is the text of the shortcode, and it is not rendering it. e.g.
[my_shortcode id="12332123" description="description goes here"]the content i typed in[/my_shortcode]

The plugin which has the shortcode i am trying to use is active.
Any idea how i could do this?

Thanks,
Josh

Hey Josh,

I’ve already assigned another member of the team who can assist you with your concern. :slight_smile:

Ben

Hi Ben, I think I have figured this out now, thanks!

One other thing,
Is there a way to have a Preview shown which differs from the actual output which will be displayed on the page?

I’m creating a Timed Content Module - where the user can select content to be displayed and hidden.
so I want the preview to show 2 divs.
1st div, showing content before the timer.
2nd div to show the content after the timer.
On the page only one div will be shown at a time. either before or after.

Thanks!

You could use this conditional in frontend.php to show content while editing in BB

if(FLBuilderModel::is_builder_active()) {
// show div1 and div2
}

Awesome Thanks Josh! Works like a charm :slight_smile:

Hey Josh,

Thanks for jumping in! :slight_smile:

Joshua,

Good to know you got everything working now! Enjoy BB! :slight_smile:

Ben