php – How can I get values from a custom post type depending on where I click on my SVG map?
Question
Here’s what I would like to achieve (desktop only) : https://www.icifaubourgboisbriand.com/en/stores/
When I click on my SVG map, I would like to display an information card for each store.
I have already created my custom post type “stores” and also the card HTML.
`
<div class="store-card">
<div class="content">
<div class="address">
<span>Address</span><br>
<span><?php the_field('store_address'); ?></span>
</div>
<div class="opening-hours">
<span><?php the_field('store_opening_hours'); ?></span><br>
</div>
</div>
</div>
`
But now I don’t know how to get my values for each store created in my CPT. How can I do that ? For instance, when I click on a specific store, I want its name and its opening hours to be displayed. I haven’t figured out how to make it happen.
Many thanks !
0
2 months
2022-12-13T16:25:01-05:00
2022-12-13T16:25:01-05:00 0 Answers
0 views
0
Leave an answer