Support » Plugin: WP-Members: Membership Framework » 2.8 introduces [wpmem_txt][/wpmem_txt] to rendered page

  • Resolved globaltimoto


    Hello Chad

    2.8 gives me auto excerpts, a great time saver.

    However during this update below the excerpt and following the call to register:

    I see:


    With the login form appearing below.

    What must I do to remove “[wpmem_txt][/wpmem_txt]” from the rendered page ?

    Or could this be a caching issue ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • I use the following for the login:

    function my_login_status() {
    	global $user_login;
    	$logout = get_bloginfo('url')."/?a=logout";
    	$login = get_bloginfo('url')."/members/";
    	if (is_user_logged_in()) {
    		$wpmem_login_status = '
    		<p>'.$user_login.' | <a href="'.$logout.'">logout</a></p>';
    	} else {
    		$wpmem_login_status = '
    		<p>not logged in | <a href="'.$login.'">login</a></p>';
    	return $wpmem_login_status;
    Plugin Author Chad Butler


    Are you calling the login form with a function call? Or is this in some area outside of what would be the main content area of the page?

    What you are seeing is a shortcode that the plugin puts in on the fly to prevent the WordPress function wpautop function from adding line breaks (with the html <p> tag) to the forms. Rather than just the function off completely (which would be bad form, since that might work for some users but not others – we don’t assume), the plugin solves its own problem with a shortcode.

    If you are using the login form function outside of the main content area, then the shortcode would not be parsed and would be rendered on the page.

    So I guess I need a little more detail. Do you have a link to an example?

    The current implementation had worked without this issue using wp 3.4.2 and 2.77 of wp-members.

    The code above is placed in functions.php in a child theme of twentyeleven.

    Is that what you needed to know ?

    There is no other usage of code or shortcode related to wp-members other than [wp-members page=”register”] and [wp-members page=”members-area”] for their respective pages.

    Or have I forgotten something ? It’s been so long since I set it up.

    Hey, globaltimoto

    I had this similar issue and Chad suggested I could use the wpmem_login_form filter to get rid of those texts. And it worked!

    See this thread here for more details.

    Hi Hassan

    Yes I had read your post prior to posting this one and attempted using the code:

    $form = str_replace( array( '[wpmem_txt]', '[/wpmem_txt]' ), '', $form );

    alas to no avail.

    Hmmm, well that worked for me.

    I’m assuming you didn’t use ONLY that line of code, right?
    It should, of course, go in your theme’s functions.php inside the filter hook.

    Here is the full code snippet:

    function remove_open_wpmem_txt( $form ) {
    	$form = str_replace( array( '[wpmem_txt]', '[/wpmem_txt]' ), '', $form );
    	return $form;
    add_filter( 'wpmem_login_form', 'remove_open_wpmem_txt' );

    Try it and let me know if it works.

    Hello Hassan

    Thank you for pointing that out! I WAS missing some of the code.

    Now it’s looking good again.

    Glad to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘2.8 introduces [wpmem_txt][/wpmem_txt] to rendered page’ is closed to new replies.