There’s another filter for the post_object: acf/fields/post_object/result
, that lets you customise the result (text) displayed for each option in the post object field.
Try something like this:
function my_post_object_result( $title, $post, $field, $post_id ) {
/* Get whatever value you want here e.g. */
$short_title= get_field('short_title', $post->ID);
/* do any other processing you might want to do before returning it... */
return $short_title;
}
add_filter('acf/fields/post_object/result/name=product', 'my_post_object_result', 10, 4);
Reference: ACF Documentation for acf/fields/post_object/result
Related Posts:
- Media library – Limit images to custom post type
- Filter a custom field based on selection of another custom field (ACF) [closed]
- ACF Relationships in Custom Post Type Permalink
- Query by 2 values of a repeater ACF field
- Show ACF field from custom taxonomy and display on the single template
- Display posts if a custom field value is equal to another custom field value
- Get Custom Field Values by Another Custom Field in WordPress
- Show custom field from custom taxanomy term on custom post type
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- Custom Post type with ACF in REST API, how do I get those values?
- Custom Post Types not showing, custom WP_Query
- Rewrite WordPress URL to show CPT meta field data
- Create 3 Level Relations with ACF and WordPress
- Multiple ACF Repeaters within a Custom Post Type
- How to change post featured image using a custom field of category?
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Retrieve value of a category’s custom field
- Cluster CPT posts to users based on ACF value from their profile on dashboard
- ACF Values Don’t Show After Import Unless I Edit/Update Post
- Stuck in Order by more then one
- How to render a custom post type template with custom fields using shortcode
- Query Custom Post Type Taxonomy term with multiple parameters
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- How to query WordPress posts bycustom field with a max characters’ length
- How to group posts and get a mixed posts and groups view?
- Custom Post Types vs. Advanced Custom Fields (with Repeater Field add-on)
- Integrate Custom Post Type Events into Calendar
- Specific routing for CPT
- Query based on custom fields start and end date
- How To Import CPT With Only Few TEXT ACF Fields From Front End?
- Why is my WP Query not returning first result’s post meta?
- How to get a custom type post data when it has a connection with another custom type post?
- ACF repeater field usage
- List of users that clicked a ‘Join’ button at single post
- set_query_params using custom params defined in functions file?
- How to define the template for custom posts?
- Batch Extract Date from post title and put into ACF custom field
- Query entries from custom post type in an ACF flexible content field
- Distribute Custom Post in different pages
- How do I replace the post title with a custom field?
- How to export custom post type with ACF to individual file with automation?
- Custom Post Type with Configurable Sidebar via ACF
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- Limit search field to just search a custom post type with custom fields
- Custom field with Types: get custom field’s value label (of type select)
- Show posts associated with ACF post object and custom post type
- How can i show ACF in post excerpts
- Create if else for post types in WP_Query ‘post__in’ values
- Grouping custom wordpress post types by acf value
- Set Post Private if no linked Post Objects (ACF)
- Using ACF values in nested WP queries for CPT with date values in the past
- Create/populate Custom Posts ACF fields from external JSON file
- WordPress URL rewrites using Advanced Custom Field
- Custom Post Type and Structure Question
- CPT email notification including only new value custom fields
- Display Custom Field or Custom Taxonomy in front page /post/product
- Why do my custom post types stop displaying over time?
- How to access repeater field of a custom field?
- ACF Pro Accessing fields on a Custom Post Type
- Modify Publish Metabox location on CPT
- Some posts not displaying by taxonomy term
- ACF meta_key and meta_value break loop
- search results to show individual ACF fields from inside custom posts
- Save_post acf data not updating category of post type
- Videos Post Type with Custom Filters
- Display Specific Posts at Start of Loop
- How to display custom post type pagination buttons when processing AJAX request
- Adding specific custom fields (images) to post excerpt
- filter using custom fields
- Display custom tax in “while” loop
- Use output of wp_dropdown_categories($args)
- CPT: execute code after load if parameter is set
- ACF Post Content Not Being Searched
- Values show up in custom home page but not in custom post pages
- Display related post content and custom field content
- Fixed custom fields depending on posttype/category
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- Grouping and paging CPT events by month with custom field date
- How to load custom post type plugin after acf options page (or get settings from there another way)?
- Custom post tag images not displaying with ACF
- Get post id of permalink for a specific custom post type?
- Collection of fields in a single post
- If you’re calling a dynamic css inline style does that div have to be in the loop?
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Copying custom field value in to title
- How to show animal lineage/pedigree in WordPress?
- Custom Post Type Loop breaking php
- Styling first post using Advanced Custom Fields
- ACF Relationship: Group posts by parent category term, then child [closed]
- ACF Field to set Publish Date – Post Duplication upon Update
- Getting ACF relationship field information
- How to I add count of custom posts listed in a post as a prefix to its title
- Filter page ID outside the loop and order
- Elementor Custom Query to get Posts by ACF (Post Object Field
- Custom taxonomy meta fields
- Create WP multisites as a custom post type
- WordPress WP_Query Sort by 2 dates – custom fields
- Custom Sort Order for Custom Post Type Taxonomy
- WordPress post objects in one parent post object