• Resolved stiksa

    (@stiksa)


    I use this query but the result is shows both language (ID and EN):
    <?php
    $post_id = 123;
    $queried_post = get_post($post_id);
    $title = $queried_post->post_title;
    ?>
    <h2 class=”entry-title”>“>- <?php echo $title; ?> –</h2>

    <?php
    echo nl2br($queried_post->post_content);
    ?>

    The result:
    [:id]Tentang Kami[:en]About Us[:]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi. You should to use filter for displaying post elements (‘the_title’, ‘the_content’) or translate post objects aplying ‘wpm_translate_post’ ($queried_post = wpm_translate_post(get_post($post_id));).

    Thread Starter stiksa

    (@stiksa)

    thank you for the reply

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Manual Query Show Both Language’ is closed to new replies.