Why in my query is display two title?

Try this. The code has comments where modified. <?php // args $args = array( ‘showposts’ => 5, ‘post_type’ => ‘post’, ‘orderby’ => ‘date’, // ‘order’ => ‘ASC’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘type_id’, ‘value’ => ‘News’, ‘compare’ => ‘LIKE’ ), ) ); // query $the_query = new WP_Query( $args ); ?> … Read more

Intercept page request and add value to it

WordPress doesn’t add the vid to the $_REQUEST array. Instead, it’s saved in a class property — see WP::$query_vars which is an array. And to access the value of items in that array, use get_query_var() like so in your case: $vid = get_query_var( ‘vid’ ); echo “vid value is $vid”;

Post filtering is returning blank page

It turns out the cause of this lingering filter problem was to do with the way WordPress was set up as well as the argument of WP_Query. Once I changed the Your Homepage Displays setting to the latest posts and renamed front-page.php to be index.php, the filter began working and the blank page no longer … Read more

How to Assign / Move all Deleted post to a category

Option 1: backup – Many hosts offer backups. Sometimes you have to pay for them, but often even when you do, they’ve actually been backing everything up and paying just allows you to access them. Worth checking as this will be fastest. Option 2: post listing screen – If these posts all had only 1 … Read more

Change the color of the Password Protected Post titles

To change the color of password protected post titles in the admin In your theme or child theme, enqueue a stylesheet to load in the admin, then add some simple CSS to change the color using the class that is given to password protected posts. In your theme’s functions.php… function wpse_admin_styles(){ wp_enqueue_style( ‘admin_css’, get_stylesheet_directory_uri() . … Read more