• Resolved parishadventures

    (@parishadventures)


    Hi!

    >> The goal:
    I want to display a widget in the side bar on some pages, but a different widget on all the other pages.

    >> What works:
    I’ve created a Content Aware Sidebar that appears as I hoped, containing the widgets that appear on all pages. Call it “MainBar” just for reference.

    I also created a separate Content Aware Sidebar (Call it “DogsBar”) that has only one widget — ShortCode that adds a slideshow (all photos of dogs).

    I set Action to Merge, Target Sidebar: MainBar, Position: Top.
    The only Condition is Page Types: single pages, Auto-select new children is On, and Categories = “Dog Pages”. I set the page category for all the dog related pages to this “Dog Pages Category” category and presto! it works! (yay!)

    >> What I can’t seem to get working:
    I made another Content Aware Sidebar that is basically a duplicate of DogsBar, but this slideshow is everything EXCEPT dogs (call it “CatBar” for convenience).
    I wanted to display it on all pages that the DogBar does not appear on — basically just negate/reverse the logic for where DogBar appears.
    It has the same Action settings as DogBar (Merge into the Top of MainBar).
    The Condition is exactly the same as DogPages, but the “Exception” option is turned on. I thought this would read: “Show (merge) CatBar on all pages except those associated with the category “Dog Pages Category”.
    If I set it to another page category and turn off the Exception (e.g. Display on Categories = “Cat Pages Category”) It works on those as expected.
    Even though that works, I’d rather not have to keep updating the logic every time I add new page categories (adding them to the display list). I’d much rather say “Display everywhere except the Dog Pages Category”.

    Thanks!!
    Brent

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for reporting this and for all the details.

    Can you show me a screenshot of what your conditions for DogBar and CatBar look like? You can use imgur.com

    Thread Starter parishadventures

    (@parishadventures)

    Thank you for your response, Joachim!

    I appreciate your time and effort in making this plugin and it is my last hope — I have been unable to get the conditional widget plugins working reliably.

    I posted screenshots here: https://imgur.com/a/f0pTcqf

    The names aren’t really dog and cat, I was doing that to keep the example as simple as possible (the real names are long).

    Thanks again
    Brent

    Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for all the screenshots.

    One important thing about the Exception conditions is that there has to be at least 1 other condition for the sidebar.

    So in your case you could try to add another condition group so it says:
    Categories: All
    EXCEPT
    Categories: ATV Pages

    Another thing I see is that the CAS Sidebar Right is missing a Target Sidebar under the Action tab. Unless you are inserting this sidebar manually in Elementor or similar, you should choose the theme sidebar you want to replace here.

    Also, in version 3.15.1, when you are logged in, the Admin toolbar has a new menu item where you can see which theme sidebars, condition types, and custom sidebars are being loaded for the current page:

    View post on imgur.com

    This should make it easier to debug problems like this moving forward.

    Thread Starter parishadventures

    (@parishadventures)

    Thank you, that worked!

    I did try additional conditions, but I must not have tried as an additional condition group – that worked!

    Thanks for the additional information as well. I am using Elementor to insert it manually, because I don’t use it on every single page.

    I have been upgrading to your latest releases as they come out, good to know about the new admin menu item!

    Thanks so much I am all set now!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unable to get negative (“except”) logic working’ is closed to new replies.