How to pass ID of the post in modal window in php code?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
18 views
Good.

When you click on a post opens a modal window.

Code in a modal window.
<?php$id = 70;echo do_shortcode( ''.get_field('slider_exercises', $id).'' );?>

Code prints gallery from post using the ACF plugin. If you do not specify the $id of the post, and the gallery will not display.
JS when clicking on a post takes the post id and places any specified attribute modal window.
How to put this id into a variable $id in php code, or how to pull out the php code id attribute from html.
Or maybe there is another way?

Thank you!
by | 18 views

3 Answers

0 like 0 dislike
ie you manually specify the $id to display any post now?
by
0 like 0 dislike
by
0 like 0 dislike
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
35,534 users