Title: Filter To Replace Shortcode
Last modified: August 22, 2016

---

# Filter To Replace Shortcode

 *  [WP SITES](https://wordpress.org/support/users/wordpresssites/)
 * (@wordpresssites)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/)
 * Currently using another system which uses [member] as the shortcode.
 * How can i replace this with the plugins default shortcodes so
 * [member]
    Some content for Members who are logged in with an s2Member Level >
   = 1. [/member]
 * now returns something like this:
 * [s2If current_user_can(access_s2member_level1)]
    Some content for Members who
   are logged in with an s2Member Level >= 1. [/s2If]
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

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

 *  [cassel](https://wordpress.org/support/users/cassel/)
 * (@cassel)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781031)
 * If i understand correctly, you would need exactly what is used in example #3 
   of the Scripting section :
 * Example #3: Full access for any Member with a Level >= 1; also using [else] syntax.
 * [s2If current_user_can(access_s2member_level1)]
    Some content for Members who
   are logged in with an s2Member Level >= 1. [else] Some public content. [/s2If]
 *  [krumch](https://wordpress.org/support/users/krumch/)
 * (@krumch)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781097)
 * [@brad](https://wordpress.org/support/users/brad/): I would suggest to change
   it manually. However, if this is not possible (massive site), I can build an 
   automated way. Can be two variants: to run once and to change all your pages/
   posts, or to run each time where old shortcode appears. But, this can not be 
   very accurate, like any automated way…
 *  Thread Starter [WP SITES](https://wordpress.org/support/users/wordpresssites/)
 * (@wordpresssites)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781100)
 * [@cassel](https://wordpress.org/support/users/cassel/) Close but not quite what
   i was looking for. Thanks anyways.
    [@krumch](https://wordpress.org/support/users/krumch/)
   Thanks for the offer but I think its not that hard as i already have a simply
   function which creates my shortcode so i just need the name of the shortcode 
   changed in the function which creates the S@ 2 member shortcode. Guess i can 
   look in the files for a filter otherwise i’ll change it manually as there’s only
   about 100 posts.
 *  [KTS915](https://wordpress.org/support/users/kts915/)
 * (@kts915)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781102)
 * [@brad](https://wordpress.org/support/users/brad/),
 * Couldn’t you just use the Search and Replace plugin?
 *  Thread Starter [WP SITES](https://wordpress.org/support/users/wordpresssites/)
 * (@wordpresssites)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781103)
 * I’ll try that, Thanks [@kts915](https://wordpress.org/support/users/kts915/)
 *  [krumch](https://wordpress.org/support/users/krumch/)
 * (@krumch)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781111)
 * Thanks KTS915! I forgot this plugin…
 *  Thread Starter [WP SITES](https://wordpress.org/support/users/wordpresssites/)
 * (@wordpresssites)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781112)
 * This is what i used [http://wpsites.net/wordpress-tips/delete-invalid-shortcodes-after-changing-themes-or-plugins/](http://wpsites.net/wordpress-tips/delete-invalid-shortcodes-after-changing-themes-or-plugins/)
 * Thanks to everyone for your suggestions.

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

The topic ‘Filter To Replace Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/s2member/assets/icon-256x256.png?rev=980067)
 * [s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions](https://wordpress.org/plugins/s2member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s2member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s2member/)
 * [Active Topics](https://wordpress.org/support/plugin/s2member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s2member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s2member/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [WP SITES](https://wordpress.org/support/users/wordpresssites/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/filter-to-replace-shortcode/#post-5781112)
 * Status: not resolved