Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter roberto9911

    (@roberto9911)

    Hi, Thank u!
    I wait when you have time 🙂

    But… looking for a solution and leaning better how WP and pluging work (but i’m totally not expert of php!) I found a query on Polylang site.

    for french language
    $posts = get_posts( array(
    ‘post_type’ => ‘post’,
    ‘lang’ => ‘fr’, // use language slug in the query
    ‘showposts’ => 5,
    ) );

    OR
    for French and Germany
    $posts = get_posts( array(
    ‘post_type’ => ‘post’,
    ‘lang’ => ‘de,fr’, // query German and French posts
    ‘showposts’ => 5,
    ) );

    It seems to me similar to the one you use on your .php codes with one more param ‘lang’

    I can suppose it should be inserted in $query_args …
    Of course probably it’s necessary to extract the languages of the site (foreach…) and then the post inside each language with your…
    foreach ( $query as $value ) {
    $located = $value;
    }

    All the best! 🙂

    Thread Starter roberto9911

    (@roberto9911)

    ops solved using the PLUS button instead of cloning post

    Forum: Plugins
    In reply to: [Polylang] image files
    Thread Starter roberto9911

    (@roberto9911)

    My mistake! I have not cloned correctly page using the “plus” for each language
    SOLVED

Viewing 3 replies - 1 through 3 (of 3 total)