Title: gregoryrich's Replies | WordPress.org

---

# gregoryrich

  [  ](https://wordpress.org/support/users/gregoryrich/)

 *   [Profile](https://wordpress.org/support/users/gregoryrich/)
 *   [Topics Started](https://wordpress.org/support/users/gregoryrich/topics/)
 *   [Replies Created](https://wordpress.org/support/users/gregoryrich/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/gregoryrich/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/gregoryrich/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/gregoryrich/engagements/)
 *   [Favorites](https://wordpress.org/support/users/gregoryrich/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Creating New Portfolio Theme – Need Help](https://wordpress.org/support/topic/creating-new-portfolio-theme-need-help/)
 *  Thread Starter [gregoryrich](https://wordpress.org/support/users/gregoryrich/)
 * (@gregoryrich)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/creating-new-portfolio-theme-need-help/#post-4568856)
 * I’ve figured out a way to get the thumbnails to link to the post pages, but now
   I have a new problem. My homepage is a static page which displays a grid of all
   my posts, and I have created a separate template for the actual posts, but it’s
   not taking. Every single page is using the same template as my static page, despite
   the fact that I’ve already applied the template to my posts page, and the post
   page template has a completely different loop than my static page.
 * My homepage: [http://www.gregoryrich.com](http://www.gregoryrich.com)
 * Homepage loop:
 *     ```
       <div id="content" class="group">
   
       	<div id="gridcontainer">
       	<?php
       	$counter = 1; //start counter
   
       	$grids = 2; //Grids per row
   
       	global $query_string; //Need this to make pagination work
   
       	/*Setting up our custom query (In here we are setting it to show 12 posts per page and eliminate all sticky posts) */
       	query_posts($query_string . '&caller_get_posts=1&posts_per_page=12');
   
       	if(have_posts()) :  while(have_posts()) :  the_post();
       	?>
       	<?php
       	//Show the left hand side column
       	if($counter == 1) :
       	?>
       	            <div class="griditemleft">
       	                <div class="postimage">
       	                    <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?></a>
       	                </div>
       	                <h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
       	            </div>
       	<?php
       	//Show the right hand side column
       	elseif($counter == $grids) :
       	?>
       	<div class="griditemright">
       	                <div class="postimage">
                           <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?></a>
       	                </div>
       	                <h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
       </div>
       	<div class="clear"></div>
       	<?php
       	$counter = 0;
       	endif;
       	?>
       	<?php
       	$counter++;
       	endwhile;
       	//Pagination can go here if you want it.
       	endif;
       	?>
       ```
   
 * My posts page: [http://www.gregoryrich.com/blog](http://www.gregoryrich.com/blog)
 * Posts loop:
 *     ```
       <?php
       // the query
       $the_query = new WP_Query( $args ); ?>
   
       <?php if ( $the_query->have_posts() ) : ?>
   
         <!-- pagination here -->
   
         <!-- the loop -->
         <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
           <h2><?php the_title(); ?></h2>
         <?php endwhile; ?>
         <!-- end of the loop -->
   
         <!-- pagination here -->
   
         <?php wp_reset_postdata(); ?>
   
       <?php else:  ?>
         <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
       <?php endif; ?>
       ```
   
 * Any help is again of course really appreciated.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Problems With Setting up Portfolio Using PHP](https://wordpress.org/support/topic/problems-with-setting-up-portfolio-using-php/)
 *  Thread Starter [gregoryrich](https://wordpress.org/support/users/gregoryrich/)
 * (@gregoryrich)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problems-with-setting-up-portfolio-using-php/#post-4170268)
 * I wasn’t using z-index properly. Just realized, easy fix.

Viewing 2 replies - 1 through 2 (of 2 total)