SQL LIKE in WP_Query

Maybe a simple typo in, if ( $wp_enchanced_title_search = $wp_query->get( ‘wp_enchanced_title_search’ ) this can never fire, you should put == instead = if ( $wp_enchanced_title_search == $wp_query->get( ‘wp_enchanced_title_search’ ) Hope it works !

WordPress loop multiple orderby query with Types toolset

if you created the custom field using wp-Type then you would have to use wpcf-state-code $state_code = types_render_field(“state-code”, array()); $args = array( ‘post_type’ => ‘store’, ‘posts_per_page’ => 100, ‘orderby’ => array( ‘ASC’ => ‘DESC’, ‘meta_value’ => ‘ASC’ ) ‘meta_key’ => ‘wpcf-state-code’, ); This should work, let me know.