Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have 3 columns in my category page. On the left column, I want to show Recent posts only from that category I am viewing. In the middle column I want to show most viewed post only from that category and in the extreme right column I want o show all featured post.

I am unable to accomplish that, so needing help.

share|improve this question
    
Could you show some code, what you've tried so far? –  Lea Cohen Feb 3 '13 at 7:02
add comment

1 Answer

Use WP_query

and read this article too:

http://www.wpbeginner.com/wp-tutorials/how-to-track-popular-posts-by-views-in-wordpress-without-a-plugin/

share|improve this answer
    
I know how to show popular posts..and my question was not about how to show the popular posts but how to shows post from the category you are viewing. Anyway I hv fixed it by tweaking my query...The following code did the trick: '<?php global $post; ?> <?php $categories = get_the_category(); foreach ($categories as $category) :?> <?php $args = array( 'numberposts' => 20, 'category' => $category->term_id ); ?> <?php $myposts = get_posts( $args ); ?> <?php foreach( $myposts as $post ) : setup_postdata($post); ?> ' –  Ajay M Feb 4 '13 at 21:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.