The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
2k views

How to tell if the user is an admin?

I need to show some info only to admins visiting a page, so I need a conditional tag to identify them. So far I have found: <?php if ( current_user_can('manage_options') ): ?> is this the ...
1
vote
1answer
492 views

Conditional PNG Overlay in Custom Post Type Loop Depending on Post Type

I have a loop pulling in two different custom post types. I have that loop showing the thumbnails of posts. Each post type used to have its own seperate loop and I had set up some png overlays to ...
2
votes
1answer
1k views

Checking if a Page has an Associated Term?

I am looking for a way to do some conditional logic on terms associated with a post. Essentially I created my own custom taxonomy for "age groups" and have created three terms for them. Kids, Teens, ...
0
votes
1answer
275 views

Target pages using a specific page template

I need to target all pages using a specific page template with a conditional tag (like is_page()). Anyone done something like that before?
8
votes
3answers
7k views

Loading scripts only if a particular shortcode or widget is present

I needed a way to filter a page/posts content before it was loaded so I could add scripts to the header if a specific shortcode was present. After much searching I came across this on ...
3
votes
3answers
91 views

How do I place content on archive pages but not on main page?

I would like to place content in a sidebar of my blog articles when they are viewed in the archive, but not show this content when the blog articles are shown on the main page of my site. Can this ...