Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    (@chouby)

    You have to use pll_get_term instead.

    I have the same problem, I need to echo the name of a category outside the loop, wich I solved using get_the_category_by_id, but how do I make Polylang translate it once you switch the language?

    I understand you can use pll_get_term to get the id of the category for other languages. But, how do I echo the category title?

    Thank you.

    Plugin Author Chouby

    (@chouby)

    Does it not work?

    echo get_the_category_by_id(pll_get_term(20));

    Perfect!, that did the trick, thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get translated category id?’ is closed to new replies.