Two Pass Shortcode Handling

David Bullock — 

This setting (under Memberium > Settings > Page Handling) allows you to control how shortcodes are processed for drag and drop design pages, such as OptimizePress 2.0, Thrive Themes, Visual Composer, Divi, etc.

Our traditional setting is “No/Off”, which conforms to WordPress’s standard handling of shortcodes. This is the default option.

Our new setting is “Yes/On” which provides a more powerful way to process shortcodes so that they can include one or more elements.

OptimizePress 2.0 Advanced Mode Off

In this mode, each element of an OP2 page is processed individually. In order to conditionally display an element, you must use the conditional shortcodes before and after each element in it’s advanced settings.

OptimizePress 2.0 Advanced Mode On

In this mode, we detect when the visitor is viewing a page built in OP2’s Live Editor, and holds off processing the Memberium shortcodes until the entire page is built. Once the entire page is built, then the shortcodes are processed on the completed page. This enables you to be more dynamic in where you position your shortcodes with elements, and to include multiple elements inside of conditional shortcodes.

Which to Select

The new Advanced Mode processing is enabled by default when you install Memberium on a new site, or when you upgrade an older copy of Memberium that didn’t have this feature. Once you set it, upgrades will not change it. It is the best choice for new sites or sites that haven’t built with OP2 yet.

If you are upgrading an existing OP2 site, the best setting for you is “No/Off”, until you can make sure you’re ready for it.

Changes to do_shortcode()

If you enable this option in v2.45.07 or later, it affects the order in which Memberium shortcodes are processed. Under normal use, Memberium shortcodes are registered at the same time as all other plugin shortcodes and can be processed anywhere using WordPress’ do_shortcode() PHP function. When this option is enabled, shortcode registration is deferred and processed afterwards. In order to process code with Memberium shortcodes with this option enabled, you will need to use memb_do_shortcode().

Need Help?

Still need help? Have questions, or aren’t sure? Please contact us at Support

  • Was this Helpful?
  • YesNo