Get The Posts By Category Id..!

WordPress.jpg

yeah... it is the coolest way to show posts by category id.

you don't need to go longer.

yes, copy paste below code and it's done..!!

<?php
$current_cat_id  = get_query_var('cat');
$showposts = 10;
$args = array('cat' => $current_cat_id, 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => $showposts,'post_status' => 'publish');
query_posts($args);
    if (have_posts()) : while (have_posts()) : the_post(); ?>      
    <div class="timeline">
    <h3><?php the_title(); ?></h3>
    <?php the_content();?>
    <?php endwhile; else: ?>
    <?php _e('No Posts Sorry.'); ?>
    <?php endif; ?>
</div>

Here you guys can also submit blog for Technology + Write For Us + Guest Post category.