Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

Widgets on Pages (or not)


  #1  
Old Feb 7, 2009, 05:38 AM
Steve_T
 
59 posts · Jan 2009
I'm adding widgets to my blog but they are not so relevent on the pages. Is it possible to have them not appear on pages or even have some and not others appear on pages
  #2  
Old Feb 7, 2009, 06:07 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
This plugin might do that http://wordpress.org/extend/plugins/widget-logic/

AFAIK you'll insert PHP code into that plugin.

"If this is a page":
PHP Code:
is_page() 
"If this is not a page":
PHP Code:
!is_page() 
"If this is a page with the ID V, W, X, Y OR Z"
PHP Code:
in_array$post->ID, array(VWXYZ) ) 
"If this is not a page with the ID V, W, X, Y OR Z"
PHP Code:
!in_array$post->ID, array(VWXYZ) ) 
If $post->ID doesn't work in the examples above try $wp_query->get_queried_object_id()

"If this is the page 'about' or the page 'products'"
PHP Code:
is_page('about') OR is_page('products'
"If this is the homepage" (includes page 2, page 3...):
PHP Code:
is_home() 
"If this is the real homepage" (and not page 2, 3..)
PHP Code:
is_home() AND !is_paged() 
"If this the static page that I selected as homepage"
PHP Code:
is_front_page() 
  #3  
Old Feb 7, 2009, 06:37 AM
Steve_T
 
59 posts · Jan 2009
amazing - it works

thanks for all the effort and listing the tags too
  #4  
Old Feb 10, 2009, 09:13 AM
gesman
 
35 posts · Feb 2009
Few more functions usable for this widget:

http://wordpress.org/extend/plugins/...c/other_notes/

Gleb

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing widgets on pages mactony Sidebars & Widgets 45 Nov 1, 2010 02:06 PM
Problem Customizing Widgets on Different Pages davidferris Sidebars & Widgets 1 Apr 27, 2009 09:00 PM
Need help creating pages with custom settings and widgets Humphrey Sidebars & Widgets 1 Apr 21, 2009 10:14 AM
Widgets produce blank pages - how can I fix this? bjt1t2t3 Sidebars & Widgets 0 Mar 15, 2009 11:05 AM
Set left sidebar widgets same distance from center area as right sidebar widgets daisy24 Sidebars & Widgets 2 Feb 19, 2009 06:11 AM


All times are GMT -6. The time now is 11:41 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.