• 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)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category coding help’ is closed to new replies.