• Hi,

    I have a specific need, I don’t understand how to ?

    I’d like to display single content and lists of custom post, by I need to filter this content by value passed in custom field..

    To explain, I need to manages Tennis Clubs in my Back Office, but I would like to filter by my ‘adminsitrators’ acf == current_user to display on front page.

    I’m lost can you help my on this one.

    Thanks by advance..

    Regards from France

Viewing 1 replies (of 1 total)
  • Thread Starter gzsdev

    (@gzsdev)

    Hi,

    I tried to display my need. I got all I want to display, unless one thing I do not know how to do..
    May need some help on this one..

    I would like to make the users include dynamic to pass the value of my ACF field “administrators”. This code following display want I want for this user.. But I need to make it dynanmic.. I’m awaiting many more users..

    [pass user_field=ID]
        [loop type=page_clubs]
            [if field=adminsitrators value='{USER_FIELD}']
                <table style="min-width:100%">
                    <thead>
                        <tr>
                            <th>Logo</th>
                            <th>Nom du club</th>
                            <th>Code Postal</th>
                            <th>Ville</th>
                            <th>Administrateurs</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td style="max-width: 10em">[field image]</td>
                            <td>[field title]</td>
                            <td>[field zip_code]</td>
                            <td>[field city]</td>
                            <td>
                                [field adminsitrators]
                                    [users include=11,12,3]
                                    Admin: [user]
                                    Contact: [user email]
                                [/users]
                            </td>
                        </tr>
                    </tbody>
                </table>	
            [/if]
        [/loop] 
    [/pass]

    If someone can help on this one. I take it !

    Regards from Paris.
    Chris

Viewing 1 replies (of 1 total)
  • The topic ‘Filter by custom field = current_user’ is closed to new replies.