HelloARI logo: vinyl signs and identity design home«    web design«    sign design«    photography«    blog«    contact« 

web design and wordpress development 94114
blog»
san frnacisco web design

WordPress Support » Widget Logic (logged in?)

0 Flares 0 Flares ×

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))

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×
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>

*
*

 

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×
© 2016
contact  |  links  |  rss