POD Only Works if Published (not Private)

[ad_1]

My code starts with something like the following which works perfectly if I publish the data, if I make it private, the code will fail (for me, my understanding is that only I should be able to see it, but it seems even I can’t).

$PlantPod = pods('plant', pods_v( 'last', 'url' ));
$BotanicalName = $PlantPod->field("name");
if ($BotanicalName == "")
echo '404';
else
echo 'Good plant data is accessible...';

I don’t really know what “pods_v( 'last', 'url' ))” does since as far as I can see it is undocumented. Maybe it makes sense to a WordPress expert but it doesn’t to me. Thanks for any pointers.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer