find wordpress posts by category name

How to find wordpress posts by category name

You can fetch the wordpress posts by category name. We have given simple code snippet for find wordpress posts by category name.  Many developer want to do this. I will show how easily achieve this.
You can control the per page post showing and pagination also. You can use following code in any of your page.

How to find wordpress posts by category name

Use following code :

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php  query_posts('paged='.$paged.'&category_name=Your Category&posts_per_page=10'); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php while ($my_query->have_posts()) : $my_query->the_post(); ?>

php the_permalink() ?>" title="<!--?php the_title(); ?-->">
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_title(); ?>

<br />
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_content(); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endwhile; ?>

find wordpress posts by category name
find wordpress posts by category name

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.