WordPress.org

Forums

Widget Logic
Don't display on single pages in a specific tag (2 posts)

  1. NewSeasonDesign
    Member
    Posted 2 years ago #

    I tried to be specific with my php, but I'm not getting this to work. I want some widgets to be hidden on single pages in a group of tags. Here's the php I'm using:

    ! is_single && has_tag( array( 'passover-recipes', 'passover-coupons', 'passover-meal', 'passover-symbols', 'kosher-for-passover', 'passover-on-a-budget' ) )

    I also tried this:

    ! is_single && ! has_tag( array( 'passover-recipes', 'passover-coupons', 'passover-meal', 'passover-symbols', 'kosher-for-passover', 'passover-on-a-budget' ) )

    Any idea what I'm doing wrong? The site is here: http://kosheronabudget.com

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

  2. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    try

    !( is_single() && has_tag(array(…)) )

    that is you are missing the () after is_single, and need those outer brackets. I think. (replace … with your list of tags of course!)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.