When a user is not logged in I am trying to show
Support || Log In
When they are logged out it should say
Support || Log Out
<
Another way to display content for users with a shortcode. Post this into functions.php
// When member is logged in [memberin]
add_shortcode( 'memberin', 'member_check_shortcode' );
function member_check_shortcode( $atts, $content = null ) {
function member_check_shortcode( $atts, $content = null ) {
if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
return $content;
return '';
}
// When member is logged out [memberout]
add_shortcode( 'memberout', 'member_check_shortcode_out' );
function member_check_shortcode_out( $atts, $content = null ) {
if (!is_user_logged_in() && !is_null( $content ) && !is_feed() )
return $content;
return '';
}