• Eggy

    (@zearth)


    hi, I have created a italian post which has no english translation. the problem is when I switch to Italian language it just show all post with english to italian language post only, the dedicated italian post is not showing. Can you help me how can I included in the query to show also italian post with no english translation.

    TIA

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

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

    (@chouby)

    Thread Starter Eggy

    (@zearth)

    i did that but the problem is it is not showing the italian post which is dedicated italian post and no english post counter part.

    here is the code I did

    $targs=array(
    'post_type' => array('post_event'),
    'showposts' => 1, 'lang' => 'it',
    'post_status' => 'future',
    'order' => 'ASC',
    'orderby' => 'date',
    );
    $lidqry = new WP_Query($targs);
    while ( $lidqry->have_posts() ) : $lidqry->the_post();
    $clink = get_permalink($post->ID);
    $ddats = get_the_date( $d );
    $ctdb = $post->post_content;
    $rdbl = explode('|!|',$ctdb);
    $newrow .= '<div class="nwrow">
    <div class="nwtm">'.$ddats.'</div>
    <a href="/it/news/events"><b>'.$post->post_title.'</b> - '.$rdbl[1].'</a>
    </div>
    ';;
    endwhile;
    wp_reset_query();

    TIA

    Thread Starter Eggy

    (@zearth)

    here is my entry in the wp-admin post

    Event 1 (has english and italian post)
    Event 2 (has english and italian post)
    Event 3 (italian post only)
    Event 4 (italian post only)

    in english display it shows event 1 and 2, but when I switch to italian display it show post 1 and 2 only, the post 3 and 4 was not showing/visible on the loop under italian page

    Thread Starter Eggy

    (@zearth)

    sorry I think I found the solution, the dates are publish and it should be future dates which is why it is not showing, thanks again

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘showing italian post only’ is closed to new replies.