this is probably a VERY stupid question but I'm a bit new into this so please help me out. I have written a mini code using instagram API that loads photos from a specific location, using the location id. Now what I want to achieve is that use this for a wordpress website i'm building that lists some hotels and restaurants. I've defined the location id as a custom field, so I need to use the following code to call it:
<?php echo get_post_meta($post->ID, 'Instagram', true); ?>
And my url to call the photos is the following:
<?php $result = fetchData("https://api.instagram.com/v1/locations/LOCATION-ID-HERE/media/recent/?access_token={$accessToken}&count=6");?>
The above code works if i insert a location id manually. What I want to achieve is insert the above code into the "location-id-here" part. I guess this is quite simple but I'm kind of confused as both are php functions.
Any help would be greatly appreciated!