Title: Category coding help
Last modified: August 21, 2016

---

# Category coding help

 *  [ThomasOlyphant](https://wordpress.org/support/users/thomasolyphant/)
 * (@thomasolyphant)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/category-coding-help/)
 * Hello
    I’m trying to get my website working the way I want it to. I’m a theme
   called gridphoto, and the categories shows 8 posts on each page. But I would 
   like it to show all my posts in one page. Can someone help me out here?
 * Here’s the code.
 *     ```
       get_header(); ?>
   
       			<div id="main-photos">
   
       			<?php if ( have_posts() ) : ?>
   
       				<?php /* Start the Loop */ ?>
                       <?php $imgDefault = array ('bamboo-460x460.jpg','bird-460x460.jpg','brown-460x460.jpg','coffee-cups-460x460.jpg','fruit-460x460.jpg','halloween-460x460.jpg','shell-460x460.jpg'); $i = 0; $j = 0;
       				?>
   
       				<?php while ( have_posts() && ($j < $gridphoto_option['gridphoto_homepage_posts_nr']) ) : the_post(); ?>
   
       				<div class="four columns home-thumb">
   
       				<?php if ( has_post_thumbnail() ) :  ?>
       					<a>">
       						<?php the_post_thumbnail('thumbnail'); ?>
       					</a>
       				<?php else: ?>
                               <a>">
                               <img src="<?php echo get_template_directory_uri();?>/images/<?php echo $imgDefault[$i]; ?>" class="attachment-thumbnail wp-post-image" />
                               </a>
                               <?php $i++; if ($i == 6) $i = 0; ?>
       				<?php endif; ?>
   
       					<div class="overlay2">
   
       						<h3 class="entry-title"><?php if (strlen($post->post_title) > 20) {
       								echo substr(the_title($before = '', $after = '', FALSE), 0, 20) . '...'; } else {
       								the_title();
       								} ?>
       						</h3>
   
       					<!--END .overlay -->
       					</div>
       				</div>				
   
       				</article>
       				<? $j++; ?>
   
       				<?php endwhile; ?>
   
       				<br class="clear">
       			   </div>  <!-- End Main -->
       			  <?php /* Display navigation to next/previous pages when applicable */ ?>
   
       				<?php if (  $wp_query->max_num_pages > 1 ) : ?>
   
       				  <nav id="nav-below">
       					<div class="nav-previous"><?php previous_posts_link(); ?></div>
       					<div class="nav-next"><?php next_posts_link(); ?></div>
       				  </nav><!-- #nav-below -->
   
       				<?php endif; ?>
   
       				<?php /* Only load comments on single post/pages*/ ?>
       				<?php if(is_page() || is_single()) :
   
       				   comments_template( '', true );
       				 endif; ?>
   
       		<?php else : ?>
   
       				<article id="post-0" class="post no-results not-found">
       					<header class="entry-header">
       						<h1 class="entry-title"><?php _e( 'Nothing Found', 'gridphoto' ); ?></h1>
       					</header><!-- .entry-header -->
   
       					<div class="entry-content">
       						<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'gridphoto' ); ?></p>
       						<?php get_search_form(); ?>
       					</div><!-- .entry-content -->
       				</article><!-- #post-0 -->
   
       		<?php endif; ?>
   
       			</div><!-- #content -->
   
       <?php get_footer(); ?>
       ```
   
 * _
    [Please use the code buttons – as is, your code may have been damaged by the
   forums parser]

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

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/category-coding-help/#post-4195817)
 * Where did you get the theme from? I don’t see it here:
 * [http://wordpress.org/themes/](http://wordpress.org/themes/)
 *  Thread Starter [ThomasOlyphant](https://wordpress.org/support/users/thomasolyphant/)
 * (@thomasolyphant)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/category-coding-help/#post-4195819)
 * No it’s this theme [http://gridphoto.buzzrain.com/](http://gridphoto.buzzrain.com/)
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/category-coding-help/#post-4195820)
 * Unfortunately, these forums only provide theme-specific support for themes from
   the repository on this site. See if the developer of the theme can help you with
   this.

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

The topic ‘Category coding help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/category-coding-help/#post-4195820)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
