Initializing PODS in front-page.php
-
[UPDATE]
After further investigation, i found out that if i pass a $params array like this$params = array( 'limit' => 3 );
the pods object gets data, but without the $paras (where i expected i would get all episodes) it does’t. Dunno if this is a bug or .. ? According to the documentation, it should work without the need for $params.
I am attempting o build a custom homepage, which will present (some) of my data.
The code i use is$episodes = pods(‘episodes’);
if ($episodes->total() > 0 )
{
while ($episodes->fetch())
{
$episodes->display(‘title’);
}
}Now the same code works in other parts of my site for example archive-episodes.php but will not work in the custom front page where a global WP_query object doesn’t exist.
The pods object ($episodes) doesnt get any data.
Is there something i must initialize in a page without a global query ?Thank you!
M.
- The topic ‘Initializing PODS in front-page.php’ is closed to new replies.