• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Archives for do_shortcode

do_shortcode

Why you should NOT use do_shortcode()

Chad Butler · Jan 28, 2019 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

DO NOT use do_shortcode() to run a shortcode!

If you have to ask yourself “why?” when reading that, then this post is for you!  

Continue Reading →

Remove an unparsed wpmem_txt shortcode

Chad Butler · Apr 11, 2013 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

The wpmem_txt shortcode is something that WP-Members puts in on the fly and its purpose is to prevent WordPress from putting line breaks (<p> and <br /> via the wpautop and wptexturize functions) into the form, thus throwing off the layout.  This is one of those magic things that runs in the background that no one really knows about unless something breaks it.

Here is the problem: WordPress runs the shortcode parser on the content only once.  By itself, that’s not a problem.  However, if a plugin or theme developer includes a shortcode in their code and they do not use the function do_shortcode() on the $content variable before returning it, any shortcodes that are executed after theirs will be unparsed. For WP-Members, a bad practice like that will result in leaving wpmem_txt unparsed in your form.

So… how do you fix this?  Continue Reading →

Creating sidebar content with the logged in/out shortcodes

Chad Butler · Jul 8, 2012 ·

A powerful use of the WP-Members logged in/out shortcodes is using them to display “login specific” content in the sidebar.  This post will discuss how to set that up. Continue Reading →

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy