Solved

Wordpress Widget Logic

Posted on 2014-01-07
3
338 Views
Last Modified: 2014-01-15
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
Comment
Question by:oo7ml
3 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 39761909
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
 

Author Comment

by:oo7ml
ID: 39761916
I thought so too, but 'graphics' is a category of the portfolio section so it doesn't work like you suggested.
0
 
LVL 15

Accepted Solution

by:
eemit earned 500 total points
ID: 39761995
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that you've installed WordPress 2.9 (http://www.experts-exchange.com/articles/Web_Development/Blogs/WordPress/WordPress-2-9-What-to-Expect-When-Upgrading-to-WordPress-2-9.html?) on your site, you need to install some plugins to get the most out …
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now