Solved

Wordpress Widget Logic

Posted on 2014-01-07
3
335 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
adding a javascript form onto wordpress 1 41
PHP time() function 12 63
htacces issue 2 39
Wordpress - Pack up & Move 2 5
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 …
Who says nothing in life is free? WordPress.com is a freebie. WordPress.org's downloadable publishing platform is free. Heck, even WordPressMU is free. WordPress is an open source project, which means it can be used on any personal or commerc…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

706 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

12 Experts available now in Live!

Get 1:1 Help Now