Widget Logic
Using PHP in Widget Logic (2 posts)

  1. DougEvans
    Posted 3 years ago #


    First, this is a great plugin, the possibilities are endless, thanks!! I am fairly new to PHP and a little confused with all of the extras that you have put into this plugin to cut down on the coding. I am hoping you can help me to use a variable that has already been set within my website. Right now I am trying this code but its not working and am hoping that it's just a minor tweak:

    global $post; return (!is_page(array('lunch-menu','dinner-menu')) && ($post->responsiveDesign.isDesktop==true));

    I found this variable using Firebug, in the DOM area.

    If anyone could give some guidance I would really appreciate it!

    Thanks in advance,


  2. alanft
    Plugin Author

    Posted 3 years ago #

    I think if you found that variable in the DOM then that's not (directly) accessible to PHP - it's more likely a CSS class. I expect you have a plugin that outputs the class setting, so perhaps you can get to that more directly from whatever that plugin does?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.