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 »

Problem Customizing Widgets on Different Pages


  #1  
Old Apr 27, 2009, 03:12 PM
davidferris
 
3 posts · Apr 2009
I am trying to remove a particular widget from two of my pages. I've tried many things and can't seem to make it work. Could you help?

First I followed the directions on this thread:

http://forum.bytesforall.com/showthread.php?t=258

I loaded Widget Logic and tried pretty much every permutation of both Widget Logic's and your instructions.

I entered into Widget Logic these options
:
in_array( $post->ID, array(V, W, X, Y, Z) )

!in_array( $post->ID, array(V, W, X, Y, Z) )

is_home() AND !is_paged()

is_page('about') OR is_page('products')

...with each of these I input the proper page ID or name, and each time it didn't ...quite...do what I'd asked. Sometimes the widget in question would appear on just the homepage, and sometimes it would appear on some pages, but not the ones I specified.

I also tried entering the $wp_query->get_queried_object_id() option into Widget Logic, and that resulted in gibberish in the sidebar (gibberish to me, anyway).

Any suggestions? Thanks!
  #2  
Old Apr 27, 2009, 09:00 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
To include it only on 2 pages:

PHP Code:
if ( is_page( array('This page''Another page') ) ) {
...

To exclude it on 2 pages

PHP Code:
if ( !is_page( array('This page''Another page') ) ) {
...


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 with spacing above and below widgets paulae Sidebars & Widgets 6 Jun 18, 2009 04:15 PM
Odd padding/margin problem in sidebar with widgets GilbertCenter Sidebars & Widgets 2 Apr 6, 2009 01:15 PM
Customizing widgets Riddle36 Sidebars & Widgets 3 Mar 4, 2009 09:25 AM
Widgets on Pages (or not) Steve_T Sidebars & Widgets 3 Feb 10, 2009 09:13 AM


All times are GMT -6. The time now is 05:46 AM.


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