Title: Shortcode inside Advanced Settings : Message
Last modified: October 11, 2021

---

# Shortcode inside Advanced Settings : Message

 *  Resolved [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * (@webbernaut)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/shortcode-inside-advanced-settings-message/)
 * /wp-admin/admin.php?page=pmpro-advancedsettings
 * Message for Logged-in Non-members:
    `<h1>This content is for !!levels!! Members
   only.</h1> [shortcode]`
 * Message for Logged-out Users:
    `<h1>This content is for !!levels!! Members only.
   </h1> [shortcode]`
 * Im customizing the message for Logged-in and Logged-out users. I have a shortcode
   I have written that pulls in the member levels dynamically. (for stylizing purposes)
   Adding a shortcode here doesn’t render the shortcode on the front end. Looking
   through some of the source code it appears this is it’s own shortcode. There 
   is a way to have shortcodes nested in shortcodes.
 * **1.** Is there is a filter here I can add to over ride this?
    **2.** If not 
   I would officially like to request a restructuring of the code to allow shortcodes
   inside these settings fields?

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

 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-inside-advanced-settings-message/#post-14979614)
 * Hi [@webbernaut](https://wordpress.org/support/users/webbernaut/)
 * Thank you for reaching out to Paid Memberships Pro.
 * You may adjust this using the following filters:
 * * [https://www.paidmembershipspro.com/hook/pmpro_non_member_text_filter/](https://www.paidmembershipspro.com/hook/pmpro_non_member_text_filter/)
   *
   [https://www.paidmembershipspro.com/hook/pmpro_not_logged_in_text_filter/](https://www.paidmembershipspro.com/hook/pmpro_not_logged_in_text_filter/)
 * You should also be able to apply the ‘do_shortcode’ filter to the above filters
   to convert shortcodes which may also work.
 * I hope this helps get you started.
 *  [ritlance](https://wordpress.org/support/users/ritlance/)
 * (@ritlance)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-inside-advanced-settings-message/#post-15154466)
 * Hey [@andrewza](https://wordpress.org/support/users/andrewza/),
 * could you possibly explain in more detail how to adjust the filters in order 
   to show the shortcodes?
 * Thanks in advance!
 *  Thread Starter [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * (@webbernaut)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/shortcode-inside-advanced-settings-message/#post-15202448)
 * [@ritlance](https://wordpress.org/support/users/ritlance/) Not sure if you worked
   your way through this but here is a little help if you haven’t.
 * If you follow the hook link it will take you to the github source.
    [https://github.com/strangerstudios/paid-memberships-pro/blob/master/includes/functions.php](https://github.com/strangerstudios/paid-memberships-pro/blob/master/includes/functions.php)
 * Here you can see how it’s used in the code written by paidmembership pro themselves.
 * On line 1925:
    `function pmpro_get_no_access_message( $content, $level_ids, $
   level_names = NULL )`
 * Inside that function on line 1958:
    You will see the filter text function being
   used. Not a member and not logged in are probably what you are looking for. As
   you can see they just add the text inside Advanced Settings. `stripslashes( pmpro_getOption('
   nonmembertext' ) )`
 * So you can actually add your own text/function to replace this.
 * Inside your theme functions.php (custom theme or child theme) you declare your
   own function that you then apply to the filter. You can have two different outputs
   for non member and not logged in or just apply the same to both. A quick example
   is below. Hope this helps!
 *     ```
       function custom_pmpro_non_member_text () {
       ...code goes here for the output you want or this could just be plain html or you can probably echo do_shortcode('shortcode') ...
       }
       add_filter( 'pmpro_non_member_text_filter', 'custom_pmpro_non_member_text' );
       add_filter( 'pmpro_not_logged_in_text_filter', 'custom_pmpro_non_member_text' );
       ```
   

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

The topic ‘Shortcode inside Advanced Settings : Message’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 3 replies
 * 3 participants
 * Last reply from: [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/shortcode-inside-advanced-settings-message/#post-15202448)
 * Status: resolved