can't display fields within a group, inside a loop

Support MB Views can't display fields within a group, inside a loopResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19507
    sofdesignesofdesigne
    Participant

    Hi,

    i am trying to display fields within a group, in a loop
    but i can only display fields outside groups

    please help

    this is my code

    {% set args = {post_type: 'dossiers' } %}
    {% set mesdossiers = mb.get_posts( args ) %}
    
    {% for dossiers in mesdossiers %}
        <div class="singledossier">
        
            <a class="singledossiertitle" href="{{ mb.get_permalink( dossiers ) }}">{{ dossiers.post_title }}</a>
                    
            <div class="singledossiercontent">
                            
                {{ mb.rwmb_meta( 'select_rbth6eu8u1', '', dossiers.ID ) }}
                {{ mb.rwmb_meta( 'group_b30kbpp4roh.select_u6xr9smqot', '', dossiers.ID ) }}

    the second field will not display

    thanks

    #19511
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You should get the group value first (return an array) then access the field by bracket notation ['field_id']

    mb.rwmb_meta( 'group_b30kbpp4roh', '', dossiers.ID )['select_u6xr9smqot']

    #19513
    sofdesignesofdesigne
    Participant

    thanks alot, it worked.

    really appreciate your support, but i really suggest you do some small videos about those very helpful functionalities that we can achieve with the plugin,

    in my case for example, a loop with some tricks on how to get different field types to show on the page, it's so hard for someone with little programming knowledge like me to figure out what is needed for each situation, i everytime stuck somewhere. documentation is time consuming and i will always end up to post my issue,

    a beautiful plugin like meta box should have every bit explained in videos for non coders, this way it will be more popular, because the famous ACF is taking all the exposure even with it's big logical problems.

    i really hope my words will encourage you to do some videos.

    and thanks again

    #19521
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for the idea, I will take a note to create the video guides with MB Views and other extensions. Have a nice day.

    #20313
    RogerRoger
    Participant

    any updates regarding the video guides?

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