Title: Query posts function
Last modified: August 22, 2016

---

# Query posts function

 *  Resolved [ChrisColston](https://wordpress.org/support/users/chriscolston/)
 * (@chriscolston)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/query-posts-function/)
 * Hi I’m trying to custmoise my home.php file (set as part of a child theme – [http://pastebin.com/nghyKsb8](http://pastebin.com/nghyKsb8))
 * I only want posts in the catgeory home to be displayed, I thought it was simply
   to add
 *     ```
       <?php if ( have_posts(<strong>cat='home'</strong>) ) : ?>
   
                               <?php /* Start the Loop */ $ink_count = 0; $ink_row_count=0 ?>
                               <?php while ( have_posts() ) : the_post();
                                        if ($ink_count == 0 ) {echo "<div class='row-".$ink_row_count." row'>";}
                               ?>
       ```
   
 * but to no avail
 * [http://madlife.co.uk/](http://madlife.co.uk/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [ChrisColston](https://wordpress.org/support/users/chriscolston/)
 * (@chriscolston)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/query-posts-function/#post-5804161)
 * Solved

Viewing 1 replies (of 1 total)

The topic ‘Query posts function’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/market/2.1.2/screenshot.png)
 * Market
 * [Support Threads](https://wordpress.org/support/theme/market/)
 * [Active Topics](https://wordpress.org/support/theme/market/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/market/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/market/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [ChrisColston](https://wordpress.org/support/users/chriscolston/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/query-posts-function/#post-5804161)
 * Status: resolved