Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Blogging Forum


You are currently viewing our Blogging Forum as a guest. Please register to participate.
Login



Reply
Widget Logic and Wordpress Conditional Tags
Old 10-27-2009, 05:08 PM Widget Logic and Wordpress Conditional Tags
seothomas's Avatar
Skilled Talker

Posts: 65
Name: Thomas
Trades: 0
I have widget logic which allows me to show certain widgets on certain pages....so if I only wanted to show my reciprical link exchanges on my home page I would enter in is_home()

NOw how about if I want to show the widget on all pages except a certain page i.e. about us or contact us?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
seothomas is offline
Reply With Quote
View Public Profile Visit seothomas's homepage!
 
 
Register now for full access!
Old 10-27-2009, 07:56 PM Re: Widget Logic and Wordpress Conditional Tags
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
You'd test to see if it's not that page

if(!is_page('about-us'))

You can test the page by the post slug, the post title, and the post id. You can also test for multiple pages as well.

It's on the Codex page about conditionals.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 10-29-2009, 04:57 AM Re: Widget Logic and Wordpress Conditional Tags
Skilled Talker

Posts: 83
Name: Mike
Trades: 0
Quote:
Originally Posted by vangogh View Post
You'd test to see if it's not that page

if(!is_page('about-us'))

You can test the page by the post slug, the post title, and the post id. You can also test for multiple pages as well.

It's on the Codex page about conditionals.
Totally agree with vangogh, try also:

!is_page(array(22,'home'))

Pretty much the same, just a little variation
Mike Smithfield is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Widget Logic and Wordpress Conditional Tags
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32034 seconds with 12 queries