Consumer Ignore

Hello,

The context is this:

  • An Archive layout, assigned to a taxonomy
  • To display the terms in that taxonomy

Structure:

Layout
– Grid
—Cell (Consumer)
----Elements

Problem

Within the taxonomy are items of type A & B

  • I want to display all the type A items
  • And ignore the type B items

Challenge

  • Once the layout is called as a front end page, the consumer sees a stream of terms, in the query run by Wordpress
  • The Cell (Consumer above) is created once per term
  • Even if I set conditions on the elements within the Cell, I can’t stop the Cell being created for type B
  • This leads to an empty Cell for type B, taking up space

Can you think of a way to exclude type B which doesn’t cause the creation of a front end element?

Happy new year! Bill.

Hi Bill,

Thank you for your inquiry.

Have you tried applying a Looper Provider > Query Builder to the Grid element? This should allow you to control which terms or posts are displayed or consumed within the cells. However, since this overrides the default query, it will affect pagination and may require a custom implementation.

If you can provide the site details in the secure note, we’ll try to check it further.

Best regards,
Themeco

The provider is Wordpress, this is a taxonomy archive layout, so Wordpress handles the incoming query provider. This is an intellectual challenge for Pro, as it breaks the model, when handling the posts being delivered to the Consumer.

It seems to be working correctly on our end. Have you tried applying the Post (has term) condition to the cell in order to select or exclude specific categories?

I’m not sure you are understanding the context. The consumer is created once per term, on an archive layout. Do you know of a way not to create an element (such as Div, Cell etc) with a condition. Please follow the setup in my original post and try this for yourself. Best wishes, Bill.

This isn’t posts, these are the terms themselves, on a layout assigned to that taxonomy.

Actually I thought again. The Consumer is being provided with posts within that Term. But even so I want to ignore some of those posts, and not display them all. Could I put a condition on the Consumer element? I’ll have to test it to see. Hmm.

Hello Bill,

On the archive layout, the Looper Consumer consumes the WordPress items assigned to that particular taxonomy. If you want to exclude other items, you will have to do it manually. Please check out this old thread:

You can then replace the is_home() condition with is_tax() for example:

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.