Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Corey Worrell

    (@coreyw)

    Hi @nicmare,

    The native WP picker does not expose the post ID in this instance, so it is not stored in the array.

    If you’d rather have the ID it might be better to use the Post Object field instead, and have a field to select internal/external link type, and then show the corresponding field (post object or url).

    Or if you’d rather keep using the Link field, you can add a filter via acf/format_value/type=link where you could possibly check the hostname of the value to test if if is an internal link, and then split the value to get just the pathname (ie: /page-name/) and then use get_page_by_path to get the ID (can be used with all post types as seen on documentation page linked above).

    Plugin Author Corey Worrell

    (@coreyw)

    Marking as resolved

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Does the array also contains post_id?’ is closed to new replies.