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 It could be useful.
Related Posts:
- Pods CMS – Get ACT’s attached image records by auto-id?
- Pods custom type integration with navigation menu and current_menu_parent
- Pods CMS – loading a pod twice in a page
- How do I disable Pods/Elementor while using Ninja Forms?
- Associative array triggered from Custom Taxonomy (WordPress PODS)
- How to change pods ACT upload dir
- Allowing Admins to edit Pod Templates on a Network/MultiSite install
- Make administrator role view only their own pod entries
- Pods cms and “advanced custom fields” plugin
- WordPress pods io – Rest API for fetching fields information for custom post type
- How to initialize PODS?
- Pagination gives 404 in template
- PODS performance vs custom field
- Creating a function within functions.php to change the date
- Using GraphQL Plugin with Pods Framework
- How do increase the amount of links shown down the left in the admin menu?
- Linking to the most recent post in a Custom Post Type
- Getting a PHP Notice when using Pods with WPML [closed]
- How to get the url of an Image with id
- Can we create a WordPress read-only virtual field derived from three other fields?
- Get url param no longer works when using add_rewrite_rule
- Custom Fields with Pods not being translated
- wp_title() returns ‘page not found’ on page 2
- Display a grid of taxonomy terms at root taxonomy page
- Duplicate category slugs from pages and posts
- Get term siblings of current child taxonomy
- displaying and sorting comments by a custom field (using PODS plugin) [closed]
- Custom User meta field display
- Include related custom fields from one post type in another post type’s JSON feed
- Define/declare new custom types with fields in plugin?
- find pods item where relationship to other pod is not set
- How to get a custom field value of a custom post?
- How to parse multiple links from one variable?
- How do I create an overview page with custom calculations from a post-type?
- Using PODS data with save_post
- How to group navigation items in the admin panel
- Pods CMS: How to add custom column to Adnvanced Content Type
- WordPress different templates for same type custom post (but different slug)
- How to add a sub directory to WordPress single posts without affecting other post types?
- Custom Post Type “MUST NOT” be able to search via URL
- Define option outside wp-config.php (on WordPress.com)
- Dynamic redirect
- Allow Users to Modify Some Values of Assigned WordPress Pods [closed]
- How do I add a menu item to a Pods admin menu?
- Fetch data of 2 relational Custom Post in WordPress
- Add custom post related by custom field to custom post
- Register PODS Custom Field with WPGraphQL [closed]
- How to display related posts using the same taxonomy for custom types (WordPress, Pods, Woo)
- How to show the clicked category related posts on category detail page?
- What is the correct way that when creating a custom post type assign values to custom fields created with pods framework?
- profile_update works on second update only
- How to check if WordPress object type is already extended by pods
- Content -> Post is easy, but Post -> Content is hard
- Trying to load JavaScript only on pages within a PODS category/ custom post type
- File Upload Management
- Passing taxonomy id of taxonomy clicked on one page to another page
- Pods pagination erases my sub menu
- Manual excerpt being ignored on custom post type
- Conditional Logic Based on Custom Taxonomy
- Custom Post Types and Posts are mixed
- Can’t create new Pods pages
- How to use orderby on meta_value when using Pods custom database table storage
- Display all child posts in a custom post type, grouped by a custom taxonomy site
- Permalinks for Custom Post Types and Taxonomies
- Custom URLs between different post types, using “Pods”