I'm trying to simply use the Geo Data Store Plugin Code functions from within my theme files and have never done this. I've tested the $sc_gds to see if isset, yet not getting anything when looping the array (eventually to loop through them as map markers)
$type = "post_type";
$sc_gds = new sc_GeoDataStore();
$ids = (array) $sc_gds->getPostIDsOfInRange( $type, $radius, $lat, $lng );
foreach ($ids as $id) {
print $id;
}
Can someone explain how to use plugin file's public static functions and any information for using getPostIDsOfInRange would be appreciated greatly.
echo $ids
outputsArray
, then the result is an array, which can't be echoed, that's just basic php. useprint_r
to see the contents of the array, orforeach
to loop over the results.foreach
addprint_r($ids)
. PS, Why are you casting the results as an array?