Support » Plugin: Widget Logic » Custom Field condition

  • Hi Alanft,

    I was wondering how to use widget logic to NOT display the widget on Custom Post Types wich have a certain Custom Field selected (in my case if “featured” is selected.

    Right now, I have widget logic displaying the widget for custom post types as follows

    ‘is_singular(‘directory’) || is_singular(‘directory-pages’) || is_singular(‘restaurant-cafe’) || get_post_meta(‘featured-label-directory’, true)==’featured’;`

    So, I would like to add the condition if Custom Field “Featured Label Directory” has “Featured” selected, then do not show the widget in the above custom post types.

    I tried to modify my code as you had sugested here but then my widget did not show up at all.


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Field condition’ is closed to new replies.