Finaly, I make this working.
I put this in my template:
<?php $contacts = get_field('list_supplier'); ?>
<?php if( $contacts ): ?>
<?php foreach( $contacts as $contact ): ?>
<a href="https://wordpress.stackexchange.com/questions/118817/<?php echo get_permalink( $contact->ID ); ?>" target="blank"><?php echo get_the_title( $contact->ID ); ?></a>
<?php endforeach; ?>
<?php endif; ?>
And here is the filter I am using
<?php
function my_acf_load_field( $field )
{
$field['choices'] = array(
'custom' => 'My Custom Choice'
);
return $field;
}
// acf/load_field/key={$field_key} - filter for a specific field based on it's name
add_filter('acf/load_field/key=field_525c37d91ae8d', 'my_acf_load_field');
?>
Related Posts:
- ACF Relationships in Custom Post Type Permalink
- Filtering a WP_Query meta_query by numeric values isn’t working
- Automatically fill custom field value on post publish/update
- Adding meta values to permalink
- Filter a custom field based on selection of another custom field (ACF) [closed]
- Make permalinks based on an ACF-field
- How to sort a table of custom posts by column containing custom field
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Use Custom Post Type as Custom Field
- What is better: Custom Fields vs Custom Taxonomies with Terms for perfomance, scalability and better user experience
- Display posts if a custom field value is equal to another custom field value
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Get Custom Field Values by Another Custom Field in WordPress
- Query Custom Post Types by date (custom field) range
- Customize permalink when creating a post
- Custom fields in Permalinks?
- Custom Post type and Custom Field WP_Query
- How to change post featured image using a custom field of category?
- Retrieve value of a category’s custom field
- How can I dynamically add a post to a custom post type which uses a custom field?
- Bulk Update Custom Fields for Custom Post Types
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- WP_Query order by custom field, then randomly order some of results
- Show custom post type relationships by taxonomy
- Query custom post type with ACF Date
- Meta Query Not Returning Output Despite Having Matching Values
- ACF From & To Date Validations
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- How to render a custom post type template with custom fields using shortcode
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Order Custom Post Type by Custom Field Value
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Multiple Frontend Filters Using Advanced Custom Fields
- Custom Post Fields at the beginning of a Custom Permalink
- Integrate Custom Post Type Events into Calendar
- Displaying custom field according to date
- WebP Fallback for Inline Background Image in Style Attribute
- Query based on custom fields start and end date
- How to get a custom type post data when it has a connection with another custom type post?
- List of users that clicked a ‘Join’ button at single post
- How to inherit field value from parent post into in child / sub post
- Custome fields not displayed
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Sum and count of custom field values
- Group by custom field value (start and end times)
- Custom post types, disable fields
- Custom Post Type with Configurable Sidebar via ACF
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Adding an extra parameter [string] to my posts’ permalink?
- Excerpt length: get first paragraph
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- ACF – Retrieve custom taxonomy from a relationship field
- Create if else for post types in WP_Query ‘post__in’ values
- Custom post ID & display information related to this ID
- WordPress URL rewrites using Advanced Custom Field
- Display Custom Field or Custom Taxonomy in front page /post/product
- How to access repeater field of a custom field?
- Filter posts by their related field’s custom field
- filter using custom fields
- CPT – Custom Text fields point to new url permalinks
- Autofill advanced custom field with user data
- Advanced search form with multiple custom fields
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- How do I display specific custom posts, and how do I edit a post’s singular page?
- Fixed custom fields depending on posttype/category
- Automatically convert standard posts with custom fields to custom post types
- Can’t pick up a field created with Advanced Custom Fields
- Get month and day from a Date Picker custom field
- Get post id of permalink for a specific custom post type?
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- How to show animal lineage/pedigree in WordPress?
- ACF – Query relationship without ID
- Retrieve a post with its ACF repeater fields in wordpress
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- Post object GUID adding http:/
- Custom Sort Order for Custom Post Type Taxonomy
- Search that will look in custom field, post title and post content
- clients list using wordpress
- How to do a custom bookmarks post type?
- How do I add media to a custom post type?
- Change message given when deleting post from custom post type
- Use menus with anchors
- 404 Issue w/ Custom Post Type – using Meta for Permalink rewrite
- Tracking changes in admin-page so user gets warning when leaving the page
- Permalinks /country/city/cpt/postname/
- Seamless permalinks between Custom Taxonomy and Custom Posts
- Custom Post Type Advanced Slug
- How to remove /blog/ prefix for custom post types in permalinks?
- Create an user checklist system for a course plateform using ACF Pro and ACF Extended
- Changing permalink of default Post with custom post
- Post Click Redirect to Custom URL instead of Single Post Page
- Enabling hierarchical in a Custom Post Type gives error 404
- “regular” pages not found after changing permalink
- Allow child pages with the same base as the CPT slug