• DougEvans

    (@dougevans)


    Hi,

    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,
    Doug

    https://www.ads-software.com/extend/plugins/widget-logic/

Viewing 1 replies (of 1 total)
  • 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?

Viewing 1 replies (of 1 total)
  • The topic ‘Using PHP in Widget Logic’ is closed to new replies.