Urltopostid

Get post / page ID from ACF Link field
You can get a post's ID from a URL with url_to_postid() . Just pass it the URL to get the ID back: $link = get_sub_field( 'offer_link' ); $id = url_to...