Hiya, I would like some help if possible please.
First question, is it possible to pull json data from a single place in WordPress? (Something similar to Global CSS or JS) Instead of copy / pasting locally / per page? - I have a long list of items with different sets of information that are combined, and I only need to pull and display things that are related to a page.
So second question, as mentioned above, I have a long list of items, but I need to filter and display only items with specified fields only. For example, below I have 5x lists, and on page A I would like to display items only with country code “GB” and on page B I would like to only display items with country code “FR” (of course I understand I would need to copy json into second page)
{
"Name": "London",
"Country": "GB",
},
{
"Name": "Paris",
"Country": "FR",
},
{
"Name": "London",
"Country": "GB",
},
{
"Name": "Paris",
"Country": "FR",
},
{
"Name": "London",
"Country": "GB",
}
Any help is much appreciated