Display custom fields from group of associated posts (not relationship)

Support MB Group Display custom fields from group of associated posts (not relationship)Resolved

  • This topic has 3 replies, 2 voices, and was last updated 1 year ago by PeterPeter.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44976
    Stefan IonescuStefan Ionescu
    Participant

    This is the setup i have:

    MetaBox + Bricks Builder

    Post type A: Event
    Post type B: Hotel

    A. Event custom fields (among others)
    Hotel (group, cloneable) :
    - Hotel Name (post advanced select)
    - Rooms (number)

    B. Hotel custom fields (among others)
    Hotel geolocation (group)
    -City
    -Website
    Hotel other info (group)
    -Star rating
    -Capacity

    I want to now display an event page where in the hotels section i can show every hotel associated with that event:

    Hotel 1 name, hotel 1 star rating, hotel 1 capacity, rooms, hotel 1 city, hotel 1 website
    Hotel 2 name, hotel 2 star rating, hotel 2 capacity, rooms, hotel 2 city, hotel 2 website
    Hotel 3 name, hotel 3 star rating, hotel 3 capacity, rooms, hotel 3 city, hotel 3 website
    …and so on

    At the moment through the Bricks query i can only display the hotel name and the rooms. I can’t seem to go deeper into the hotel name and get it’s custom fields.

    Do you see any solution? Maybe a particular way of defining/writing the query in Bricks or via Metabox Views ?

    Screenshots of the fields setup:
    https://ibb.co/1sjWjrR
    https://ibb.co/hFGMpYK
    https://ibb.co/TrcXYHG

    #44987
    PeterPeter
    Moderator

    Hello,

    You should use some custom code to display hotel custom fields (star rating, capacity ...) when you have the post ID (hotel name).

    Please follow the documentation
    https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-values
    https://docs.metabox.io/functions/rwmb-meta/

    If you use Bricks builder, you can also contact their support to get further assistance.

    #44991
    Stefan IonescuStefan Ionescu
    Participant

    Hi Peter, thanks for the response. As creating the custom code is a little bit more than my skills allow, could you point me in the right direction as to how to get some paid help/support from the Metabox team?

    #45005
    PeterPeter
    Moderator

    You can send the details of the job via this contact form https://metabox.io/contact/
    we support a customization service with an extra fee for your specific needs.

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