HelloARI logo: vinyl signs and identity design web design«    sign design«    blog«    contact«  USE MY IMAGINATION
web design and wordpress development 94114

san frnacisco web design

WordPress Support » Widget Logic (logged in?)

Do not display for people logged in

Question: Is there a conditional tag so that I can show/not show a certain widget based on whether the person is logged into the blog.

Answer: the code to use: is_user_logged_in()

The forum post below is closed so I’m answering this question here on my blog.

BTW if you want to NOT show a widget to logged in users just use: !is_user_logged_in()

via WordPress › Support » Widget Logic – Do not display for people logged in.

 

More Tips

Also: if you want to show a widget on two or more specific posts then use an array like this: is_single(array(1,147,53))

if you and to target two or more specifica pages use: is_page(array(1,147,53))

and you can use the opposite too if you want to exclude a handful of pages or posts: !is_single(array(1,147,53))

This entry was posted in WordPress. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*
*

© 1996 - 2024
contact  |  links  |  rss