• Resolved Sam-30

    (@sam-30)


    I use a plugin to show widgets on a page or post I want and don’t want.
    (widget logic)

    I have done some reseach about conditional tags, and I now a little now.
    But got 2 questions.

    The following tag:
    is_single ( array (43842,43846, 43849) ) && in_category( ‘388’ )
    This tag shows a widget in 3 posts of 1 categorie.

    – What do I have to change when I don’t want to show te widget in that 3 posts, so it shows anywhere accept those 3 posts?

    – And what if I have also 2 other posts in a other categorie?

    Cheers,
    Sam

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m not really a user of the plugin, but you might try:

    ! ( is_single ( array ( 43842, 43846, 34849 ) ) ) && in_category( 388 )

    for the first case, and for the second one:

    ( is_single ( array ( 43842,43846, 43849 ) ) && in_category( 388 ) ) || ( is_single ( array (33333, 23456 ) ) && in_category( 342 ) )

    Thread Starter Sam-30

    (@sam-30)

    ! ( is_single ( array ( 43842, 43846, 34849 ) ) ) && in_category( 388 )
    Does not work, it disapear everywhere.
    Does ! mean don’t show?
    Any one now how I can get the tag right?
    I want to show a widget everywhere on the website, only not in the 3 posts.

    ( is_single ( array ( 43842,43846, 43849 ) ) && in_category( 388 ) ) || ( is_single ( array (33333, 23456 ) ) && in_category( 342 ) )
    That works fine! Thanks a lot!

    Thread Starter Sam-30

    (@sam-30)

    It is solved!

    The tag is ! is_single ( array ( 43842, 43846, 34849 ) ) && in_category( 388 )

    And I had another plugin for logic and I don’t think they were matching together.

    It works great now and can do a lot now!
    THANKS

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional tags’ is closed to new replies.