• Resolved Mxlaxe

    (@mxlaxe)


    Hi,

    How to use a shortcode within the Custom Restrict Content message from a single post/page?

    So far my tests did not process the shortcode and it came out as is.

    Any idea about this or a hook ?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @mxlaxe

    You can only enable the shortcode for Global restricted access message with the following code snippets:

    add_filter("um_get_option_filter__restricted_access_message",function( $value ){
    
        if( is_admin() ) return $value;
    
        if ( version_compare( get_bloginfo('version'),'5.4', '<' ) ) {
            return do_shortcode( $value );
        } else {
            return apply_shortcodes( $value );
        }
    
        return $value;
    });

    Please go to WP Admin > Ultimate Member > Settings > Access > see “Restricted Access Message”.

    Regards,

    Thread Starter Mxlaxe

    (@mxlaxe)

    Hi,

    Thanks for the reply. This unfortunately solves only half the problem, because I need a custom message for another language as my website is multilingual and as far as I know there is no way to have global restricted messages per language.

    Please consider adding a filter on the final output of the restricted message, whether it’s global or custom.

    Cheers!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @mxlaxe

    Please feel free to submit a feature request or pull request in our public Github repository: https://github.com/ultimatemember/ultimatemember/issues

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shortcode in Custom Restrict Content message’ is closed to new replies.