• I am using the login shortcode for a login page. I’m curious, is there a way to change the section that says “Please log in to access this page” to something else without editing the core plugin files?

    I’d rather not use .ms-alert-box {display: none} as it will cause other things on the site that I want to see to disappear.

    https://wordpress.org/plugins/membership/

Viewing 1 replies (of 1 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello cpbeaven,

    You can use gettext filter to change that https://speakinginbytes.com/2013/10/gettext-filter-wordpress/

    <?php
    /**
     * Change text strings
     *
     * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
     */
    function my_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'Please log in to access this page.' :
    			$translated_text = __( 'Your text', 'membership2' );
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'my_text_strings', 20, 3 );

    You can use this in your theme functions.php file or as Must Use Plugin (MU Plugin).

    kind regards,
    Kasia

Viewing 1 replies (of 1 total)

The topic ‘Edit Login Page’ is closed to new replies.