• I would like to use this plugin to make full post content available only to logged in users.

    But I’m struggling with the implementation, I’m a newbie.

    <?php echo do_shortcode( '[su_members message="To view full post, please sign up or log in!"]'. the_content() .'[/su_members]' );?>

    displays the content no matter of the shortcode, it doesn’t check if the user is logged in or not.

    when using <?php echo do_shortcode( '[su_members message="To view full post, please sign up or log in!"]'. get_the_content() .'[/su_members]' );?>

    the content gets displayed only when logged in but at the same time it looses all formatting and embeds.

    when adding shortcodes to each post individually it works as wanted but that means me and the authors would have to add it individually to every new post. That’s very inconvenient.

    Is there any convenient work around?

    https://www.ads-software.com/plugins/shortcodes-ultimate/

  • The topic ‘Shortcodes in single.php template’ is closed to new replies.