Solved

Wordpress Widget Logic

Posted on 2014-01-07
3
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

705 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