Articles of custom field

How to create multiple editor?

I want to create multiple editors for my custom post type packages posts. That is for a 3 day package I want to add descriptions for each day like day 1, day 2 and day 3. For 5 day package there should be 5 editors like that.

How to convert custom fields to content

I have some custom post types and inside them I have some custom fields that I need to convert in post content. Is this possible? How can I do this?

Get post content from another section in custom single page

I created wp-theme, use plugin Custom Post Type UI. Created sections – Customers and Projects. In page-projects.php, display list (links) all of customers: $args = array( ‘post_type’ => ‘customer’ ); $the_query = new WP_Query( $args ); Im trying to display content from post projects (about customer). Page single-customer.php display content from customers, but I need […]

Unable to get specific value from post meta

I am using get_post_meta() to retrieve a custom meta field value from a given post. The custom meta box has a parent checkbox which has 3 child checkboxes. I want to get the values of both parent and child. Parent checkbox Enable Protection for this post Child checkboxes: (a) Level 1 (b) Level 2 (c) […]

Sum and count of custom field values

I need to be able to sum up all values of a specific custom field and then get the total count. For example, I have created a custom post type for reviews and each one has custom fields for 5 star rating. What I need is to add up all the values of the star […]

Get emails from users by custom field SQL

I’m trying to build an SQL query to retrieve a list of users whose “options_futures” custom field is equal to “Options” I wrote this query, but is not working: $data = $wpdb->get_results( ‘SELECT user_email FROM $wpdb->users LEFT JOIN $wpdb->usermeta WHERE options_futures=”Options”‘, ARRAY_A ); Thanks

Order WP_Query results by meta key value in custom query

I have a query used to search projects based on default WordPress fields as well as meta values. I want to sort the results based on the meta key named project_date, which is a timestamp. Here is the SQL I have so far. SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta AS mt1 ON (wp_posts.id = […]

“Virtual category page” based on a custom field filter

I am using advanced custom fields and want to display a page in the same layout like a category – with posts where the custom field has a specific value. I have no clue how to approach this programmatically and do not know how to search for plugins helping to accomplish that. Problems: how to […]

If I update WordPress my custom data will be deleted from the wp_users table?

If I update WordPress my custom data will be deleted from the wp_users table? I add new custom field and store data to users at this field if I update WordPress and WordPress needs to update this table my custom field will be deleted?

Carbon Fields use in custom plugin class

I have plugin which so far has no functional, and has a structure class Test { public function __construct() { } } $wpTest = new Test(); I need to use Carbon Fields, and when I installed this library, I changed the structure according to the instructions, only with the adaptation to OOP use Carbon_Fields\Container; use […]