How to display on the blog page the posts corresponding to the selected language, using Polylang

you can add the lang parameter to your loop arguments like so $loop = new WP_Query( array ( ‘post_type’ => ‘post’, ‘lang’ => pll_current_language(‘slug’), //returns ‘en’ for example ‘posts_per_page’ => 10, ‘post_status’ => ‘publish’, ) ); However this is not the better practice because by doing that way we override the main query which is … Read more

WP_Query and polylang issue

OK – I got it, the old posts already on the database do NOT have an english translation and that’s the problem with my loop. When I add a new post, I have the option to provide a translation which then appears in the english page. looking through the docs I found that I can … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)