Title: Protected content shortcode with nested shortcode
Last modified: August 30, 2016

---

# Protected content shortcode with nested shortcode

 *  Resolved [Kevin](https://wordpress.org/support/users/klgrimley/)
 * (@klgrimley)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/protected-content-shortcode-with-nested-shortcode/)
 * I’m in the process of setting this up and testing. There have been a number of
   minor issues I’ve run into. Most have been easy enough to solve a few not so 
   much. This is the biggest issue that I’m currently facing. I have a page where
   only part of the content needs to be protected so I’m using the [ms-protect-content]
   shortcode with an additional shortcode nested inside. This displays just find
   to a logged in user but when I’m logged in as an admin I get the the actual shortcode
   text instead of what should be rendered by the shortcode. This is actually the
   same issue as disussed here
 * [https://wordpress.org/support/topic/protected-content-message-and-shortcodes?replies=5](https://wordpress.org/support/topic/protected-content-message-and-shortcodes?replies=5)
 * Unfortunately, this references the old code and is of little use with the new
   version.
 * [https://wordpress.org/plugins/membership/](https://wordpress.org/plugins/membership/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/protected-content-shortcode-with-nested-shortcode/#post-6541823)
 * Hey there klgrimley,
 * Hope you’re well today 🙂
 * I’ve tested this on my sandbox site and I could recreate the issue. This happens
   because we didn’t set to execute shortcodes for admins.
 * I’ve reported this to our developer and this will be added in the following update
   of the plugin.
 * Since the fix is rather simple if you want to you can fix it yourself by adding
   the following line to line 268 in class-ms-rule-shortcode-model.php which is 
   located in /wp-content/plugins/membership/app/rule/shortcode/class-ms-rule-shortcode-
   model.php:
 * `$content = do_shortcode( $content );`
 * This is how it is supposed to look after you add the line [http://screencast.com/t/FVsrQ2Q5](http://screencast.com/t/FVsrQ2Q5).
 * Hope this helps 🙂
 * Cheers,
    Bojan
 *  Thread Starter [Kevin](https://wordpress.org/support/users/klgrimley/)
 * (@klgrimley)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/protected-content-shortcode-with-nested-shortcode/#post-6541855)
 * Hey Bojan,
 * Thanks for getting back to me so quickly. I figured based on the other thread
   that I’d looked at that a do_shortcode was needed somewhere. I applied the new
   line and it works as needed now. I’ll probably have another question or two that
   I’ll address in new threads.
 * Again, thanks for the quick response.
 * – Kevin
 *  Plugin Author [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/protected-content-shortcode-with-nested-shortcode/#post-6541917)
 * Hey Kevin,
 * Glad this worked for you 🙂
 * If you have additional questions please do not hesitate to ask.
 * Cheers,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Protected content shortcode with nested shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/membership_b8cdaa.svg)
 * [Membership 2](https://wordpress.org/plugins/membership/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/membership/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/membership/)
 * [Active Topics](https://wordpress.org/support/plugin/membership/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/membership/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/membership/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/protected-content-shortcode-with-nested-shortcode/#post-6541917)
 * Status: resolved