Custom query with lang argument empty
-
<?php
// Define custom query parameters
$custom_query_args = array( /* Parameters go here */ );// Get current page and append to custom query parameters array
$custom_query_args[‘paged’] = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1;
$custom_query_args[‘cat’] = ‘3’;
$custom_query_args[‘posts_per_page’] = 5;
$custom_query_args[‘lang’] = “hu”; //with this i got nothing// Instantiate custom query
$custom_query = new WP_Query( $custom_query_args );// Pagination fix
$temp_query = $wp_query;
$wp_query = NULL;
$wp_query = $custom_query;?>
This query gives me nothing however if i dont use the lang argument it gives me the ukrainian and hungarian posts both.Used in home.php
Thank you in advance
- The topic ‘Custom query with lang argument empty’ is closed to new replies.