Custom fields multiple commas separated values

It’s not supposed to. If you want to use multiple values in an IN meta query you need to pass an Array. That would look like this: $Style_Cabinet_Style = array( ‘Demo’, ‘Demo Two’ ); If you only have a String with commas separating the values, eg. ‘Demo, Demo Two’. Then you can use explode() to … Read more

How to get all wp_posts in wordpress fetched from database

More explain your question. if you want to fetch all post in database you this code $query = array( ‘post_type’ => ‘my-post-type’, ‘post_author’ => $current_user->ID, ‘post_status’ => array(‘publish’, ‘pending’, ‘draft’, ‘auto-draft’, ‘future’, ‘private’, ‘inherit’, ‘trash’) ); $loop = new WP_Query($query); while ( $loop->have_posts() ) : $loop->the_post();

Trying to get custom field data in a simple plugin

You don’t have the $post object, but trying to use it in the code ($post->ID). Use get_the_ID() function instead: <?php while ( $cat_query->have_posts() ) : $cat_query->the_post(); // $gread = get_post_meta( $post->ID, ‘read_time’, true ); // Wrong $gread = get_post_meta( get_the_ID(), ‘read_time’, true ); // Right endwhile; } From now forth always enable debugging when you … Read more

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