How to insert fields for sibling content in MB Views

Support MB Views How to insert fields for sibling content in MB Views

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32742
    A.A.
    Participant

    I am using both MB Views and MB Relationships. I have a relationship between two custom post types (book and content) and it is displaying correctly.

    By correctly I mean the single book page is listing all the content related to that book.
    And the single content page is listing everything correctly as well.

    Now, I want to add a custom navigation to the single content page, that loops through the sibling content only. Meaning, it will show a next/previous link, but that will only go through sibling content.

    However, MB Views does not seem to have it built in to the Insert Fields tab. I am not sure if it is there and I missed it, or if it can only be done manually.

    Can you tell me how to loop through the relationship query and show all sibling items using MB Views, please?

    #32758
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can use the custom query with WP arguments to show the sibling items in the loop. Refer to this documentation https://docs.metabox.io/extensions/mb-views/#custom-query

    and this topic https://wordpress.stackexchange.com/questions/304136/check-whether-the-child-page-has-siblings

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