Conditional template tag

dev.xiligroup is being renovated Forums xili-language plugin Conditional template tag

This topic contains 0 replies, has 3 voices, and was last updated by  Anonymous 11 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #3158

    xiligroup dev

    you have to use the_curlang() function with slug of target language

    like that

    if (the_curlang() == 'en_us' ) {

    echo 'this page is in english' ;




    Thanx for this fast answer, it works.



    Another question: I have a query: query_posts(‘category_name=loremipsum&showposts=3’). As a result, I get the 3 last posts for the category, but not in the proper language.

    Is-there a way to add: query_posts(‘category_name=loremipsum&showposts=3&lang=the_curlang’) ?

    ThanK you



    The idea is good but the php syntax must be fixed because the result of the function must be concatened :

    query_posts( 'category_name=loremipsum&showposts=3&lang=' . the_curlang() )




Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.