Relationships + Bricks Builder Query Loop

Support MB Relationships Relationships + Bricks Builder Query Loop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #47994
    Kimberly SkaggsKimberly Skaggs
    Participant

    I've got a Custom Post Type for FAQs. I'd like to be able to "assign" each FAQ to pages and/or archives. So I set up 2 relationships: FAQ to Page and FAQ to Service (which is a CPT). I "assigned" each FAQ to the page and/or archive I want it to be displayed on.

    I have a Bricks template for my FAQs that I'm using on pages and archives which is using a query loop.

    But I'm stumped on how to set up the query loop so that the correct FAQs are displayed. I've tried using the query type MB Relationship: FAQ to Service which works. I've tried using the query type MB Relationship: FAQ to Page which works. But there's no way to select both relationships in the same query. Any help would be appreciated as I'm new to CPTs and query loops.

    #47995
    Roel PetraRoel Petra
    Participant

    I assume you have a single page template with the conditions set to the pages you want the FAQ's to be displayed on. Then you must have a query loop, in this query loop you select your relationship "_to"

    Since the query loop will show 2 possible relationships, you need to use the _to relationship in this case.

    #47999
    Kimberly SkaggsKimberly Skaggs
    Participant

    Hi Roel, I thought that since I was assigning the FAQs to the pages I wanted them on using relationships that I wouldn't need to set conditions. Am I wrong?

    #48004
    PeterPeter
    Moderator

    Hello Kimberly,

    I'm not sure if Bricks builder supports adding multiple relationships in one query. You can contact their support and ask them to get more information.

    If you use PHP code, please follow the documentation https://docs.metabox.io/extensions/mb-relationships/#query-by-multiple-relationships

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.