Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Problem Customizing Widgets on Different Pages (http://forum.bytesforall.com/showthread.php?t=1447)

davidferris Apr 27, 2009 02:12 PM

Problem Customizing Widgets on Different Pages
 
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!

Flynn Apr 27, 2009 08:00 PM

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') ) ) {
...




All times are GMT -6. The time now is 10:58 PM.

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