Hiide posts in Arabic version if the post doesn't have arabic content.
-
Hi,
I have two languages in my website arabic and english. Both working fine. Now I have a doubt that how to hide the posts arabic version taht doesn’t have arabic content? Now when I changes to Arabic version it shows english posts in home poge. So I just needs to hide the posts that don’t have arabic content from Arabic home page and category listings.
Below is the code I am using for listing the posts:
<?php while (have_posts()) : the_post(); ?> <div class="item"> <article <?php post_class(); ?>> <a href="<?php the_permalink(); ?>"> <?php if(has_post_thumbnail()) : ?> <div class="thumbnail"> <?php the_post_thumbnail(); ?> <span class="more"> <i class="fa fa-plus-circle"></i> Read more</span> </div> <?php endif; ?> <div class="entry-data"> <h2 class="entry-title"><?php the_title(); ?></h2> <div class="entry-content"> <?php the_excerpt(); ?> </div> </div> </a> </article> </div> <?php endwhile; ?>
Please help..
thanks,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hiide posts in Arabic version if the post doesn't have arabic content.’ is closed to new replies.