Support » How-To and Troubleshooting » Category Page customization

Category Page customization

  • 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.

Viewing 1 replies (of 1 total)
  • Never mind…I found the solution… The below 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); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Category Page customization’ is closed to new replies.