Modify WordPress Main Query – The Right Way

 * Modify WordPress Main Query - The Right Way
 * @refer
function modify_wp_main_query_done_right( $query ) {
  if ( $query->is_main_query() ) {
    $query->query_vars['meta_key'] = 'statusverified_13141'; 
    $query->query_vars['meta_value'] = 1; 
add_action( 'pre_get_posts', 'modify_wp_main_query_done_right' );

Refer WP Query to discover other query_vars

Hello, I am Arun Basil Lal. Thank you for reading!

I am a freelance WordPress developer with over a decade of experience. I am passionate about making things and traveling the world.

Divi WordPress Theme - My Review

Divi WordPress Theme
Divi is a WordPress theme that web designers do not want you to know. It comes with a drag-and-drop theme builder. You can build beautiful looking unique websites without touching a line of code. Just choose from one of the many pre-made layouts, or pick elements and arrange them any way you like.

Divi is every WordPress developer's wet dream. Surprise your clients with neat responsive websites and have fun building them.

Divi comes from Elegant Themes. If you enjoy building websites, you *need* an Elegant Themes membership. 87 beautiful themes and 5 plugins for the cost of less than a candy-bar each!

Note: I am an avid user of Divi myself and this is a honest review. I wouldn't recommend something that I do not personally find amazing.

Leave a Reply

Your email address will not be published. Required fields are marked *


Share With Friends