• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

Wordpress Widget Logic

Hi, i am using widget logic to display certain widgets on certain pages... for example, if i want a widget to display on my 'about' page i simply use:

is_page('about')

Open in new window


Does anyone know how to get a certain widget to display on a page that has a url as follows:

www.mydomain.com/portfolio/graphics


WIDGET LOGIC
http://wordpress.org/plugins/widget-logic/other_notes/

Thanks in advance for your help
0
oo7ml
Asked:
oo7ml
1 Solution
 
James RodgersWeb Applications DeveloperCommented:
Does anyone know how to get a certain widget to display on a page that has a url as follows:

www.mydomain.com/portfolio/graphics

should just be is_page('graphics')
0
 
oo7mlAuthor Commented:
I thought so too, but 'graphics' is a category of the portfolio section so it doesn't work like you suggested.
0
 
eemitCommented:
Try this:
is_post_type_archive( 'your_custom_post_type_slug' )

Open in new window


or this:
is_category( 'graphics' )

Open in new window


or:
if (is_post_type_archive( 'your_custom_post_type_slug' )  && is_category( 'graphics' )  )

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now