How to list custom fields on a page - including related fields

Support General How to list custom fields on a page - including related fieldsResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17731
    Robert O. AakermanRobert O. Aakerman
    Participant

    Hi,

    This is a several part question - asking since I have a hard time finding the answers:

    I have a Cat database with 3 different dB tables that relates to each other
    - Cat (Name, number and metadata) (A Cat is unique but can be parent to other cats)
    - Observation place (Where it was seen) (Same cat can be seen at different times and places)
    - Origin town (Where it came from) (Different cats can be from same town)

    1. How do you show your Custom fields in a table on a Page in frontend - Is there a MB plugin?
    2. How would you go about showing all the Custom Fields - INCLUDING the related Custom Fields data?
      (That is show all CATs with all their Observations and where it Originated from)
    3. Can you sort such a table on Field titles?
    4. How can you make a search for a Cat and show all Custom Fields and Related Custom Fields?
      (This could be a separate page with a Search form that gives result under the form so you can serach over and over.

    Really grateful for any hints, tips or tricks to achieve this.
    Anything that will make me understand the necessary steps.

    The MB is really nice and good...but there are so many bits and pieces 🙂

    //Aakerman

    #17754
    Anh TranAnh Tran
    Keymaster

    Hi Robert,

    How do you show your Custom fields in a table on a Page in frontend – Is there a MB plugin?

    You probably need to use some code to output the custom fields. Please refer to the helper functions to do that. As you control the code, you can output it the way you want (in table or list, or plain HTML).

    How would you go about showing all the Custom Fields – INCLUDING the related Custom Fields data?

    If you use MB Relationships to create relationships between objects, you can get all the related items. And for each item, you can get custom fields using the helper functions as above.

    Can you sort such a table on Field titles?

    You might want to use a JS-solution such as DataTables.

    How can you make a search for a Cat and show all Custom Fields and Related Custom Fields?

    Please try FacetWP. We also have a free integrator with it.

    #17760
    Robert O. AakermanRobert O. Aakerman
    Participant

    Thank you for the good answers.

    Regarding FacetWP; am I to understand that the MB Custom fields are NOT searchable at all, unless we get FacetWP?

    //Aakerman

    #17785
    Anh TranAnh Tran
    Keymaster

    Hi Robert,

    am I to understand that the MB Custom fields are NOT searchable at all, unless we get FacetWP?

    Yes and no.

    For simple fields (non-clonable and non-groups), they're searchable using meta query of WP_Query.

    For clonable fields and groups (and also fields in the custom table), the data is stored in the serialized format, which makes the meta query useless. FacetWP resolves this problem quite well.

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