Title: OlyReeve's Replies | WordPress.org

---

# OlyReeve

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Add a css style or class](https://wordpress.org/support/topic/add-a-css-style-or-class/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/add-a-css-style-or-class/#post-3090228)
 * I owe you a beer, thanks man.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Add a css style or class](https://wordpress.org/support/topic/add-a-css-style-or-class/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/add-a-css-style-or-class/#post-3090219)
 * That gave me this error:
    Parse error: syntax error, unexpected T_FOREACH, expecting‘,’
   or ‘;’ in…
 * Thanks
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/page/2/#post-3082706)
 * Thanks guys that worked. Sorry keesiemeijer that was perfect. Thanks for your
   patience one and all. 🙂
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/#post-3082704)
 * Thanks for your help people, Kessitemeijer – it didn’t work, sorry. The page 
   is a custom page template.
 * Esmi I changed what you said but it’s given me an error, have I missed something?
 *     ```
       <?php
       /*
       Template Name: Blog Template
       */
       get_header(); ?>
       <div id="main">
                 <div class="main-section">
                       <div class="headline">
                           <div class="holder">
                               <h1>Blog</h1>
                           </div>
                       </div>
                       <div class="main-content">
                           <?php
                   $args=array(
       			'post_type' => 'post',
       			'post_status' => 'publish',
       			'posts_per_page' => 10,
       			'paged' => get_query_var('paged')
       			);
   
       			query_posts($args);
       			if( $my_query->have_posts() ) { ?>
       			<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       				<h3 class="category"><?php the_category();?> </h3>
       				<div class="blogContainer">
       					<div class="blogpiece">
       					<div class="titleMeta"><div class="metaDeets">by <?php the_author_posts_link(); ?> | <?php the_time('g:i') ?> | <?php the_time('d/m/Y') ?></div><h6><?php the_title(); ?></h6></div>
       					<div class="mainText">
       						<?php the_excerpt(); ?>
       					</div>
       					<div class="readMorebox"><a href="<?php echo get_permalink(); ?>">&raquo; Read more</a></div>
       					</div>
       				</div>
       			<?php endif; ?>
       									<?php posts_nav_link(' — ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>
                       </div>
                   </div>
       </div>
       <?php get_footer();?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/#post-3082701)
 * I wish I knew how to! I’m an amateur and wouldn’t know hot to rewrite the code
   with query_posts(). Thanks for the advice though esmi.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/#post-3082698)
 * It’s a single loop. This is how my code looks with your nitin_8, it still doesn’t
   work:
 *     ```
       <div class="main-content">
                           <?php
                   $args=array(
       			'post_type' => 'post',
       			'post_status' => 'publish',
       			'posts_per_page' => 10,
       			'paged' => get_query_var('paged')
       			);
   
       			$my_query = null;
       			$my_query = new WP_Query($args);
       			if( $my_query->have_posts() ) { ?>
       			<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
       				<h3 class="category"><?php the_category();?> </h3>
       				<div class="blogContainer">
       					<div class="blogpiece">
       					<div class="titleMeta"><div class="metaDeets">by <?php the_author_posts_link(); ?> | <?php the_time('g:i') ?> | <?php the_time('d/m/Y') ?></div><h6><?php the_title(); ?></h6></div>
       					<div class="mainText">
       						<?php the_excerpt(); ?>
       					</div>
       					<div class="readMorebox"><a href="<?php echo get_permalink(); ?>">&raquo; Read more</a></div>
       					</div>
       				</div>
       			<?php endwhile; ?>
       									<?php posts_nav_link(' — ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>
   
       			<?php }
       			wp_reset_query();
       			?>
   
                       </div>
       ```
   
 * Thanks
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/#post-3082692)
 * its a custom template file.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/#post-3082690)
 * Hey Matiniboy.
 * Thanks for trying did you have any luck in the end? I’ve tried for the life of
   me to get it working but no luck!
 * Thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination-1/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp-query-pagination-1/#post-3082425)
 * Thanks Martiniboy but i got an error:
    Parse error: syntax error, unexpected 
   T_VARIABLE on line 15
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [14 years ago](https://wordpress.org/support/topic/wp-query-pagination/#post-2947751)
 * Thanks for your patience. I just want the first post to appear differently to
   rest of the posts. I created two loops because I didn’t know how to make the 
   first one different. This is probably the reason it’s messing up! Cheers!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP Query Pagination](https://wordpress.org/support/topic/wp-query-pagination/)
 *  Thread Starter [OlyReeve](https://wordpress.org/support/users/olyreeve/)
 * (@olyreeve)
 * [14 years ago](https://wordpress.org/support/topic/wp-query-pagination/#post-2947738)
 * Thanks for your help, it’s still not quite working right, here’s my full code–
   it’s messy 🙂
 *     ```
       <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
       	<?php global $post;
       		$args = array( 'numberposts' => 1, 'child_of' => 6);
       		$myposts = get_posts( $args );
       		foreach( $myposts as $post ) :	setup_postdata($post); ?>
       			<div class="article">
       				<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
       				<h5><?php the_category(', '); ?></h5>
       				<h4>Written <?php the_time('jS F Y') ?> by <?php the_author_posts_link(); ?></h4>
       				<a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail('large'); } ?></a>
       				<?php the_excerpt(); ?>
       			</div>
       	<?php endforeach; ?>
       <?php endwhile; ?>
       <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
          $args = array( 'posts_per_page' => 2, 'child_of' => 6, 'offset' => 1, 'paged' => $paged);
          query_posts($args);
          if (have_posts()) : while (have_posts()) : the_post(); ?>
             <div class="articleOld">
                <a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium'); } ?></a>
                <h4><?php the_time('jS F Y') ?> in <?php the_category(', '); ?></h4>
                <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                <?php the_excerpt(); ?>
             </div>
       <?php endwhile; endif; ?>
       <?php posts_nav_link(' — ', __('« Newer Posts'), __('Older Posts »')); ?>
       ```
   
 * and a link if you need to see whats going on, thanks!
    [http://kitehub.co.uk/bude/beaches](http://kitehub.co.uk/bude/beaches)

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