Viewing 7 replies - 1 through 7 (of 7 total)
  • Did you managed to figure it out @rafaviana ?

    Thread Starter rafaviana

    (@rafaviana)

    @yossitrabelsi no, I didn’t…

    I’d be interested to know if this is possible also?

    vdl

    (@dellalibera)

    I would also like to know this …

    I have this working with a custom taxonomy. I have buttons/badges that hide and display depending on a category.

    Query looks like:

    Dynamic Tag -> Post Terms (then click on Post Terms and choose your Category to use, and set the separator to comma if not already, as wordpress outputs them with a comma usually)
    Condition: Contains
    Compare Type: Text
    Conditional Value: <Category>

    The value of the category text is the display value, not the slug.

    • This reply was modified 3 years, 8 months ago by rachaelburke.
    Plugin Author crazypsycho

    (@crazypsycho)

    Hello @dellalibera , @norfolkpete , @rafaviana , @yossitrabelsi

    you can use the solution from rachaelburke, but than you can only check for one category.
    Other way is to use in_array as Compare type.
    But you have to disable Linking in in Post-Terms-Tag and than comma-separate the categories and add a span around, like this:

    <span>category1</span>,<span>category2</span>

    Plugin Author crazypsycho

    (@crazypsycho)

    Now you can use the new in array contains compare type for this and so you don′t need to add spans around.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show/hide widget based on post category’ is closed to new replies.