I am not too sure how Polylang works, but the views should be agnostic unless you are talking about translating the word “views”. If that is the case than nope it does not support multiple languages because it is templated.
An alternative is to go to WP-Admin -> Settings -> PostViews, removed the “views” word from the “Views Template”
Then in your theme php page, you can call a <?php the_views(); ?><?php _e('views'); ?>
Thanks for the response Lester.
Polylang basically doubles Posts. I started with english versions and then I created a spanish site with all the posts that is translated to spanish. They are distinguished by the “lang” taxonomy, so if I want to put up bunch of posts, I would just need to include that taxonomy in the array. For example:
$args = array( 'numberposts' => 4, 'post_status'=>"publish", 'lang' => 'en', 'post_type'=>"post",'orderby'=>"post_date",'order'=> 'DESC','tag'=>"Feature",'category__not_in'=> array(19,27,454,1318)); // Social Calendar, Contests, Events
This only displays english posts.
If I wanted to do that for the most popular posts, I’d need to call your popular post function but I would want it to filter out for me only one language posts.
Add in the meta
<?php query_posts( array( 'meta_key' => 'views', 'orderby' => 'meta_value_num', 'order' => 'DESC' ) ); ?>
Ah, that sounds like it would solve the problem!
Is ‘meta_value_num’ the plugin’s variable or WP’s global variable?
Very cool. You rock Lester, thanks!
I was going to “resolve” it but I guess it’s not a directly a support question.