WordPress.org

Support

Support » Plugins and Hacks » Custom Field condition

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 http://wordpress.org/support/topic/plugin-widget-logic-use-custom-field-data-with-widget-logic?replies=2 but then my widget did not show up at all.

    Thanks

    http://wordpress.org/extend/plugins/widget-logic/

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