[Plugin: Polylang] How to query for posts in the page language?
-
The theme I am using in header.php queries for all posts in a specific category to show a special slideshow. How can i get this query to consider the language of the post and only return items that match the language of the current page?
$cat = get_option(THEME_NAME.'_slider_category'); $args= array('cat'=>$cat,'post_status' => 'publish','posts_per_page' => 1000); query_posts($args); $pageURL = get_page_url(); $i = 1; while (have_posts()) : the_post(); $img = ""; if (has_post_thumbnail()) { //do some stuff }
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘[Plugin: Polylang] How to query for posts in the page language?’ is closed to new replies.