pods
pods copied to clipboard
pods in backend
hi maybe beginners question, but i cannot find any info about this. I'm trying edit some custom field form in user profile, but it look's pod's is not accsessible in wp backend - what sound quite stupid. My code:
add_action ( 'edit_user_profile', 'my_show_extra_profile_fields' );
function my_show_extra_profile_fields ( $user )
{
?>
... text ...
<select id="category_lat" name="category_lat" >
<?php
global $pods;
$params = array(
'GROUP BY' => 't.name',
'limit' => -1 // Return all rows
);
$tmp='';
$pods = new pods('dance_category_latino', $params);
while ( $pods->fetch()) {
echo data ...
}
}
}
?>
</select>
but i gat the error Fatal error: Class 'pods' not found in ...
do i have to declare something if i would like to use pods in wp backend? Gracias Martin
pods() is a global function, no need to use the new keyword.
Thanks a lot! you saved me 100 hours of troubleshooting :) Have a nice day