Support » Plugin: Members » Call for default Error Message

  • Hopefully easy question: I’m doing a bit of a complicated template using this. I am able to insert the post-specific error message with:
    echo esc_textarea( get_post_meta( $post->ID, ‘_members_access_error’, true ) );

    Instead, how would I insert the default error message set at Settings -> Members?

    Thank you.

    UPDATE: Found it:
    $default_error_message = members_get_setting( ‘content_permissions_error’ )

    • This topic was modified 11 months, 1 week ago by  lectest1.
Viewing 1 replies (of 1 total)
  • Plugin Author Justin Tadlock

    (@greenshady)

    WordPress God

    I’d recommend the members_post_error_message() function:

    
    members_post_error_message( $post_id );
    

    It will check the post message first. If it doesn’t exist, it falls back to the one set via the Settings screen.

Viewing 1 replies (of 1 total)
  • The topic ‘Call for default Error Message’ is closed to new replies.