WordPress.org

Ready to get started?Download WordPress

Forums

Order post by subcategory - display each in one row (1 post)

  1. phalanx80
    Member
    Posted 1 year ago #

    Hi!
    I'm trying to display my post ordered by child category
    Example:
    subcategory1 --> post1 - post2 - post3
    subcategory2 --> post1 - post2 - post3
    subcategory3 --> post1 - post2 - post3
    ecc...
    This is my query...doesn't work and display every post of every category:

    <?php $cats = array(
    	'type'                     => 'post',
    	'child_of'                 => 71,
    	'orderby'                  => 'name',
    	'order'                    => 'ASC',
    );?>
     <?php 
    
      query_posts('$cats&posts_per_page=45' );
    
      if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    Anyone can help me?
    I suppose it should not so difficult but now drives me crazy! :-(

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic