Title: [Plugin: Widget Logic] Doesn&#8217;t play well with PHP Code Widget
Last modified: August 19, 2016

---

# [Plugin: Widget Logic] Doesn’t play well with PHP Code Widget

 *  [Driftless](https://wordpress.org/support/users/driftless1/)
 * (@driftless1)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/)
 * I’m running a PHP code widget (to run a customized RSS feed parser) and when 
   I assign a Widget Logic statement to it, and click save, it pauses for a minute
   then completely DISAPPEARS from my Admin manage widgets page. (And disappears
   from my site too).
 * Hmmmm… I want to replicate this problem that plagued me for several hours yesterday,
   and now it appears to be working… So, I will leave this as a resolved question
   in case anyone else finds such a similar quirk…

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [Driftless](https://wordpress.org/support/users/driftless1/)
 * (@driftless1)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-902970)
 * Damn, I just had it happen again.
 * I had all my widgets working with logic. Then I added a “recent posts” widget,
   gave it a condition of !is_home() and *poof* my php-code widget disappeared. (
   it had a condition of is_home() )
 * I reloaded the php code widget, re-conditioned it, and now its working fine. 
   For the moment.
 * Any thoughts?
 * (Sorry if this is a repost of my self-reply… connection is spotty and I think
   it ate my last reply…)
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-902974)
 * point me at the php code widget you are using and i’ll take a look.
 *  Thread Starter [Driftless](https://wordpress.org/support/users/driftless1/)
 * (@driftless1)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903147)
 * Thanks for the speedy assistance.
 * Its the widget by Otto:
    [http://wordpress.org/extend/plugins/php-code-widget/](http://wordpress.org/extend/plugins/php-code-widget/)
 * And I’m sorry I can’t provide more consistent examples of when it happens – it
   seems entirely random at this point. I’ll let you know if it shows any consistency.
 * Oh, and the PHP code I am running in the PHP Widget is a derivation of Google
   Calendar Feed Parser:
    [http://wordpress.org/extend/plugins/google-calendar-feed-parser/](http://wordpress.org/extend/plugins/google-calendar-feed-parser/)
 * Cheers
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903156)
 * so you’re jsut putting `gcal_parse_feed();` in the widget?
 * the code used might be important as it might manipulate data that is used in 
   the !is_home() – is that still the condition you are using/checking?
 *  Thread Starter [Driftless](https://wordpress.org/support/users/driftless1/)
 * (@driftless1)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903249)
 * Yeah – sorry, got busy on another project.
 * This random behavior seems to happen regardless of the conditional… (I think)
   I currently have the PHP Widget set to is_home()||is_page(‘foo’)
 * Or at least, I did… I just went to double check, didn’t change anything on any
   widget settings, hit ‘save changes’ just for the hell of it, and *poof* no more
   PHP widget.
 * Funny eh? Its been working for days on the site. And I just re-included the PHP
   code widget, re-assigned it the same (is_home()||is_page(‘foo’)) and saved it,
   and it works fine again.
 * So the results are consistently inconsistent 😉
 * Hope that helps.
 * Oh – and I am just calling <?php gcal_parse_feed ?> from the body of the widget.
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903258)
 * well just to let you know i have witnessed a vanishing php code widget now. but
   try as i might i haven’t got it to happen a second time. will keep trying variations…
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903259)
 * AHA. i might not have hit upon the same vanishing as you have, but i have hit
   on one instance of the PHP widget vanishing.
 * now i’m using the latest 2.7beta – but see if it’s the same on your 2.6.
 * add a PHP widget, set it up and hit save.
 * then click ‘edit’ to expand the control and check the settings, followed by ‘
   cancel’ to fold it up again and hit save changes
 * it vanishes. with or without widget logic active. :-/
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903260)
 * Hmmm.. Does this happen only with the widget logic plugin as well?
 * The PHP Code widget is basically identical to the built-in Text Widget with one
   very minor modification (and renaming, of course), so there should not be any
   weirdness there.
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903261)
 * i’m on the 2.7 beta, and with only your plugin active – nothing else – i get 
   the same behaviour. this might not be the same as the behaviour that driftless
   is seeing, but it’s worth looking into anyway.
 * add a (built in) text widget, set title and body, click done
    add a execphp widget,
   set title and body, click done click save changes
 * all comes back ok showing both widgets. but
 * click edit and then cancel to expand and hide each widget and click save changes–
   the php widget vanishes.
 *  Thread Starter [Driftless](https://wordpress.org/support/users/driftless1/)
 * (@driftless1)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903326)
 * Aha!
 * Sorry – been uber-busy, but yes I think alan has nailed the sequence of events.
   I can replicate it consistently – the key is “edit – cancel – save” seems to 
   nuke it. The standard text widget is unaffected.
 * And – it does it without widget-logic installed. So – this is not a widget logic
   bug, but a strange PHP code widget error…
 * Any thoughts Otto?
 *  Thread Starter [Driftless](https://wordpress.org/support/users/driftless1/)
 * (@driftless1)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903327)
 * Oh – and I’m using WP 2.6.5 with PHP Code Widget 1.1

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘[Plugin: Widget Logic] Doesn’t play well with PHP Code Widget’ is closed
to new replies.

## Tags

 * [php code](https://wordpress.org/support/topic-tag/php-code/)

 * 11 replies
 * 3 participants
 * Last reply from: [Driftless](https://wordpress.org/support/users/driftless1/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/plugin-widget-logic-doesnt-play-well-with-php-code-widget/#post-903327)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
