• V:1,7,3

    Hi,
    I created a home page on my home.php
    When I installed Polylang every thing working well for the nav menu. It’s quite a good plugin !
    But I make 3 widgets below the nav with wp-Query that call a categories ID and when I switch the language, Polylang doesn’t recognize the synchronization because each translation of the categories got a new ID.

    Can we get the same ID of one Catégorie FR and UK ( Or use the FR categories for the UK post) ?

    I need to make a request to recognize the language for change the ID ?
    <?php $my_queryCol1 = new WP_Query(‘cat=8&posts_per_page=1’);

    Tx for your help.

    Marc

    https://www.ads-software.com/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    If your category 8 is translated in the other language, Polylang should filter the query and you should get a post in the correct language. At least it is what I obtain in my tests.

Viewing 1 replies (of 1 total)
  • The topic ‘ID catégories or how to query for posts in the page language?’ is closed to new replies.