• Resolved humpdi

    (@humpdi)


    Hey!

    How can I show for example a <div> only to logged in users?

    Normale I can do something like <?php echo do_shortcode( ‘[restricted]’ ) ?> but in that case it has to be an ending shortcode too…

    How is that possible to just show some content to logged in users in my template?

    Thanks!

    https://ww.wp.xz.cn/plugins/front-end-only-users/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Humpdi,

    Maybe try something like:

    <?php echo do_shortcode( '[restricted]' . $YourText . '[/restricted]' ) ?>

    And then assign whatever you want to display to the $YourText variable?

    Thread Starter humpdi

    (@humpdi)

    did work, thanks a lot! 🙂

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

The topic ‘Restriction in Template’ is closed to new replies.