Home Forums Front-end Issues Get fields from a clicked link Reply To: Get fields from a clicked link

  • Hi there,

    Wordpress has a built-in function to determine the post ID from a given URL : url_to_postid( string $url );
    It will return the post ID or 0 on failure.

    1) So first, you’ll probably target your clicked url with javascript and store it.
    2) Then you could use the wordpress function to get the post ID and your acf values.
    3) Finally, you launch your modal if you get all your needed datas.

    Let me know if it helps,