• Resolved gjyshi

    (@gjyshi)


    is there any function for this? All pages are getting the general WordPress page structure with its sidebar, I created a new one with specific sidebar for UM so I want to automatically add my custom template to all UM pages.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @gjyshi

    Maybe these articles helps you – https://docs.ultimatemember.com/category/118-templates.

    Regards.

    Thread Starter gjyshi

    (@gjyshi)

    Thanks for reply in fact I used a different way like this one below:

    $shortCodesToTest = [ 'ultimatemember'];
    $anyShortCode = false;

    foreach ($shortCodesToTest as $sc) {
    if (has_shortcode( $post->post_content, $sc) ) {
    $anyShortCode = true;
    }
    }

    So what I was trying to do is adding a new sidebar for all ultimate member pages instead of default WordPress sidebar.

    if ( class_exists( 'UM_Functions' ) && $anyShortCode ) {
    //new sidebar
    } else {
    //old sidebar
    }

    This way worked fine for me if you have any other idea with a shorter code would be great.

    Thank you.

    Thread Starter gjyshi

    (@gjyshi)

    Yes in the documentation I found more functions you are right for this topic the solution is this one

    is_ultimatemember()

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add page attribute to all ultimate member pages automatically’ is closed to new replies.