Site icon Denis Bouquet

MembershipWorks use shortcode in your page template

Instead of do_shortcode you will need to use apply_filters if you are using the shortcode provided by MembershipWorks in your theme templates. do_shortcode won’t work with the MembershipWorks snippets codes.

You can find different shortcodes in the help section.

How to use the MembershipWorks shortcodes in PHP templates

Replace

<?php echo do_shortcode('[mw open="!calendar/r"]'); ?>

By this:

<?php echo apply_filters( 'the_content',' [mw open="!calendar/r"] '); ?>

And this should solve the issue of the shortcode not working. Remember that you can only use one MembershipWorks shortcode per page.

Exit mobile version