Title: Help with home.php
Last modified: August 24, 2016

---

# Help with home.php

 *  [miiiiiiiip](https://wordpress.org/support/users/miiiiiiiip/)
 * (@miiiiiiiip)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/help-with-homephp/)
 * Hey, I’m currently using a free wordpress theme Seller, and I want to change 
   the home page’s display function. Here is the original code:
 *     ```
       <main id="main" class="site-main" role="main">
       		<?php $count = 0; ?>
       		<?php if ( have_posts() ) : ?>
   
       			<?php /* Start the Loop */ ?>
       			<?php while ( have_posts() ) : the_post(); ?>
   
       				<?php
       					/* Include the Post-Format-specific template for the content.
       					 * If you want to override this in a child theme, then include a file
       					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
       					 */
       					if($count == 0)
       						echo "<div class='row'>" ;
       					elseif($count%4 == 0)
       						echo "</div><!--.row--><div class='row'>";
   
       					if (isset($option_setting['logo'])) :
       						get_template_part( 'content', 'grid3' );
       					else :
       						get_template_part( 'defaults/content', 'grid3-d' );
       					endif;
   
       					$count++;
       				?>
       			<?php endwhile; ?>
       			<?php echo "</div><!--.row-->"; ?>
   
       			<?php seller_pagination(); ?>
   
       		<?php else : ?>
   
       			<?php get_template_part( 'content', 'none' ); ?>
   
       		<?php endif; ?>
   
       		</main>
       ```
   
 * Now, I am trying to change this function so that instead of displaying the recent
   posts, I want to make something like “editor’s choice” or “recommended reading”,
   and those displays are going to be pages, and static, not posts. I understand
   the original code and which part to change, but not sure to change it to what.
   I have read some articles about page_id, is this the right way to approach? Any
   idea would be very helpful!

The topic ‘Help with home.php’ is closed to new replies.

## Tags

 * [display](https://wordpress.org/support/topic-tag/display/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [miiiiiiiip](https://wordpress.org/support/users/miiiiiiiip/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/help-with-homephp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
