Is there a way to filter the ACF link field to only display certain post types like the “post link” field does? I prefer using the “link” field because sometimes the user needs to set an external url, sometimes just an anchor tag and sometimes a page. But having all my custom post types show up in the list is annoying since many of them do not have pages, but are used for other things. I only want posts, pages and one of my custom post types to show up in the list.
Does anyone know a way of doing this?
I have ACF Pro, but I don’t know if this is a pro feature so I’m not sure where it belongs.
Thank you.
The link field uses the WP built in link modal and it can be filtered using a wp_link_query_args filter.
This could also be corrected by setting advanced settings when creating post types, public, publicly_queryable, and others. See the WP documentation for en explanation of CPT settings.
Thank you! I’ll look into this