Just wondering, did you get anywhere with this? I’m having the exact same problem, only the other shortcodes I have tried from this plugin work perfectly in the same function. So [wc_button type="primary" url="http://webplantmedia.com" title="Visit Site" target="self" position="float"]Sample Content[/wc_button]
will work, but [wc_toggle]
won’t, even if they’re both in the same do_shortcode()
function.
No, unfortunately I didn’t.
I think I found a solution, a couple of days ago. I forgot I had posted on here, otherwise I would have shared this earlier.
My data that I want to appear ([wc_toggle][/wc_toggle]
) is stored in a custom meta field, which is then brought into my template where needed. Instead of using do_shortcode
, I found that <?php echo apply_filters( 'the_content', get_post_meta( get_the_ID(), 'custom_field_name', true ) ); ?>
works. I think replacing the get_post_meta
function with your own content would do the same job.