Home>Support>WooCommerce Canvas + Post loop Additional query arguments

WooCommerce Canvas + Post loop Additional query arguments

Hi,

I’m using the Canvas Theme from WooThemes, the WooCommerce plugin and SiteOrigin Page Builder.

In Page Builder Post loop I would like to set Additional query arguments…

…to get posts from a category_A exclude tag_A (tag_A is ID28):

category_name=category_A+tag=-tag_A

or
category_name=category_A+tag__not_in => array('28’)

…and in an other case to get posts from two categories category_A and category_B:

category_name=staff+news

All don’t work.

Is there a bug in Page Builder or is a mistake in my code?
Any Ideas please?

Thank you very much and greetings from Berlin!

Martin

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Hi Martin

    Apologies for the lack of documentation on this. Please try using category ID’s

    cat=x,y,z
    

    Where x,y and z are category ID integers.

    The widget will take care of the surrounding PHP for you. I believe I’ve also tested it with tags. If necessary you can try combine like so:

    cat=1&tag=apples
    

    Also, if you want a carousel, our carousel widget in the Widget Bundle: http://wordpress.org/plugins/so-widgets-bundle/ has an evolved query builder. Unfortunately it is also lacking documentation right now. When building a query with the new carousel widget just start typing in the search field for a category name you know or a page name etc. It’ll start prompting with a list.

    Let me know if you need any more help on these.

    Hi from Cape Town :)

  2. 9 years, 9 months ago Martin Heidler

    Hi Andrew,

    thank you very much.

    cat=x,y,z

    does’t work. I need posts within cat_x AND cat_y. Do you have any idea?

    Can you recommend a code for EXCLUDE posts with tag-x working with Page Builder Post Loop?

    Thank you for:

    cat=1&tag=apples

    It works :-)

    Hi from Berlin

  3. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Would:

    cat=x,y

    Not add posts from category x and y?

    You can exclude as follows:

    Single case:

    cat=-3

    Multiple case:

    cat=-1,-2,-3
  4. 9 years, 9 months ago Martin Heidler

    Hi Andrew,

    cat=x,y

    does not work. But it turns out, that this works:

    cat=x&y
    cat=-3

    and

    cat=-1,-2,-3

    work.

    But I would like to know to exclude posts with tag-x, not cat-x.

    Hope you can help me. Thank you!

  5. 9 years, 9 months ago Martin Heidler

    Exclude one tag work with:

    cat=3&tag__not_in=31

    But I can’t exclude more then on tag. For example:

    cat=3&tag__not_in=31,32

    does’t work

    cat=3&tag__not_in, array(31,32)

    does’t work

    How can I exclude more than one tag in Post loop Additional query arguments?

    Thank You!

  6. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    I dug around a bit now and I’m not sure it’s possible from within the Post Loop widget to achieve what you’re after.

    Ref: http://stackoverflow.com/questions/9693644/related-posts-wordpress-loop-excluding-certain-tags.

    Another option might be to build a custom page template and manually construct a query.

    (Our Widget Bundle – Carousel Widget has a visual interface for it’s query bundle: http://wordpress.org/plugins/so-widgets-bundle/. It only has the carousel template for now. We’ll launch a lot more Post Loop style widgets there in the future.)

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More