Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Following scenario

I am using this in my archive.php to fall back to german in case there are no translations:

if (is_category()) { $categories = get_the_category(); $category_id = $categories[0]->cat_ID; $deCatId = pll_get_term($category_id, "de"); query_posts(array_merge($wp_query->query, array('post_type' => 'post', 'lang' => 'de', 'cat'=>$deCatId))); echo var_dump(query_posts(array_merge($wp_query->query, array('post_type' => 'post', 'lang' => 'de', 'cat' => $deCatId)))); }

Now there are hundreds of posts in the default language which is german (de) but only like 3 posts in english. Now when I want to use pagination to the next page, when using english, I get a "Page Not Found" error. Obviously, because the system thinks there is no page 2 in english, since there are only 3 posts the system thinks there is only the main category page. But since I am using german as a fallback language, there is in fact, a page 2. Just with registered posts in german.

Is there a way around this problem?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.