Many CPT is conflicting of the custom date

If your posts store the date in a consistent format like YYYY-MM-DD HH:MM:SS, etc, you could compare with strings using regular expressions, like: $current_date = new DateTime(); $datemonth = $current_date->format(“m-d”); // MM-DD $args = array( // … ‘meta_query’ => array( array( ‘key’ => ‘birthday’, ‘compare’ => ‘REGEXP’, // Regular expression explanation: // ^ – Start … Read more

Sort posts based on an acf field called fecha value return longtext ‘20240517’

You should be able to order your posts by adding the following to your main args: ‘meta_key’ => ‘date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, Example: $args_post = array ( ‘post_type’ => ‘post’, ‘posts_per_page’ => -1, ‘fields’ => ‘ids’, ‘meta_key’ => ‘date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tipo-de-contenido’, … Read more

add_post_meta unique value for all custom posts

you can use the save_post hook to validate the uniqueness of email and phone fields before saving the post. Replace seller with your actual post type slug and add below code in functions.php file // Add custom meta box for Seller post type function add_seller_meta_box() { add_meta_box( ‘seller_meta_box’, ‘Seller Details’, ‘render_seller_meta_box’, ‘seller’, ‘normal’, ‘default’ ); … Read more

Want to add custom post type for facebook feed

You need to add the post via function call wp_insert_post. where you need to pass the parameter of post type as name of your custom post type. $wordpress_post = array( ‘post_title’ => ‘Post title’, ‘post_content’ => ‘Post Content’, ‘post_status’ => ‘publish’, ‘post_author’ => 1, ‘post_type’ => ‘custom_post_type’ ); wp_insert_post( $wordpress_post ); Hope this helps

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)