Pods: Authors to Custom Field

Solved! I’ve created this script: <?php global $wpdb; $postwp = $wpdb->get_results ( “SELECT ID,post_author,post_title FROM wp_posts WHERE post_status=”publish” and post_type=”post”” ); $users = $wpdb->get_results ( “SELECT post_id,meta_value FROM wp_postmeta where meta_key = ‘id_utente_user'” ); foreach($postwp as $key1=>$value1) { foreach($users as $key2=>$value2) { if($value1->post_author==$value2->meta_value) { add_post_meta( $value1->ID, ‘autore’, $value2->post_id ); } } } ?> I hope … Read more

How to change pods ACT upload dir

The short answer here is you can’t check whether the upload is coming from a Pods Advanced Content Type, especially since the media that gets uploaded has no post_id associated to it (it’s not a post at that point). The longer answer is that you can still customize this if your file upload field is … Read more

Pods CMS – Get ACT’s attached image records by auto-id?

You’re right, the attachments are stored within a separate table called wp_podsrel. Within the table you’ll find the item_id (coupon id) and the related_item_id (attachment id). Hence you can get all the related_item_id‘s as a function of the item_id: SELECT related_item_id FROM wp_podsrel WHERE item_id = $coupon_id Your complete query/output may look something like this: … Read more