Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    It seems you are using the body login/registration forms in a sidebar?

    Since those forms aren’t intended for that purpose, you may get varying results. That shortcode is something that the plugin puts in on the fly to overcome WP’s putting p and br tags into the content. That doesn’t happen in the sidebar.

    So you either need to allow shortcodes in your sidebar or use one of the plugin’s filters to remove it (see the forms filters in this list)

    I am unfortunately, experiencing the same problem. Could a specific solution to the problem please be provided by the Plugin Author?

    I attempted the functions file modifications as described here, however the only result was a white screen.

    Plugin Author Chad Butler

    (@cbutlerjr)

    Well… that was the specific solution. Unfortunately, in taking a look at it from your link, it appears that the shortcode in the code snippet is being parsed in the page which of course renders the code snippet kind of useless. When it was originally posted, the site was different, so I think something in shift to the new theme might have caused an issue with the code snippet display.

    Anyway, I tried to edit it and seemed to have made the issue worse, so I’ll just post the snippet here:

    add_filter( 'wpmem_login_form', 'remove_wpmem_txt' );
    add_filter( 'wpmem_register_form', 'remove_wpmem_txt' );
    
    function remove_wpmem_txt( $form ) {
    	$old = array( '[wpmem_txt]', '[/wpmem_txt]' );
    	$new = array( '', '' );
    	return str_replace( $old, $new, $form );
    }

    That’s what the code snippet is supposed to be.

    However, if you are using the current 2.9 release, I am a little surprised this is an issue. I made some significant changes to the form building functions in this release and one of those changes was to hopefully completely resolve any of these unparsed shortcodes.

    Also if you are using 2.9, there is actually a new and better way to remove this. It’s a little more efficient because it doesn’t have to use str_replace:

    add_filter( 'wpmem_register_form_args', 'my_form_defaults' );
    function my_form_defaults( $args ) {
    	$args = array(
    		'txt_before' => '[wpmem_txt]',
    		'txt_after'  => '[/wpmem_txt]',
    	);
    	return $args;
    }

    I am using 2.9, but I’m also using WP 3.8.1, so I’m not sure if that’s a factor in why it’s being ornery. The first function provided worked, the second did not.

    Thank you bunches!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove from displaying [wpmem_txt] [/wpmem_txt] widget’ is closed to new replies.