I’m looking at purchasing this plugin for a website I’m building and I have a question;
I’m building a custom theme for the website and I’m building the page templates myself. I would like to display content conditionally in these page templates depending on whether a user is logged in or not.
I tried using the logged in / not logged in shortcodes in my page template but they’re not working as intended; I think because each shortcode has to be used twice (once to open and once to close).
This is my current code:
<?php echo do_shortcode(""); echo do_shortcode("[logged_in]"); ?> <div class="text"><?php echo $loggedintext; ?> Visit the <a href="<?php echo $forumlink; ?>">Discussion Board</a></div> <?php echo do_shortcode("[/logged_in]"); ?>
Is there a template tag I can use or another way I can display content conditionally like this?