Title: Posts not displaying anything
Last modified: August 19, 2016

---

# Posts not displaying anything

 *  Resolved [chrismitchell57](https://wordpress.org/support/users/chrismitchell57/)
 * (@chrismitchell57)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/posts-not-displaying-anything/)
 * I have checked all the various bits of the code I can think of and for some reason
   or another my posts aren’t displaying when they are clicked.. they are just blank…
   see with my link below:
 * [http://www.newsswipe.co.uk](http://www.newsswipe.co.uk)
 * any ideas as to why this is happening?
 * Thanks in advance
 * Chris

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

 *  [alism](https://wordpress.org/support/users/alism/)
 * (@alism)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/posts-not-displaying-anything/#post-1329774)
 * I’m guessing you fixed this? Posts look like they’re displaying fine now. Few
   404’s, but that might be plugin related?
 *  Thread Starter [chrismitchell57](https://wordpress.org/support/users/chrismitchell57/)
 * (@chrismitchell57)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/posts-not-displaying-anything/#post-1329794)
 * Not really fixed.. now back to a previous error.. which means that the first 
   post always displays.. Its not a plug in issue 🙁 as it does the same when I 
   disable all plugins.. It must be something to do with the code i’m using to call
   the post.. I just don’t know.
 *     ```
       <?php get_header(); ?>
       			<div id="block_featured" class="block">
                   	<div class="block_inside">
                           <div class="text_block">
                               <div class="hellotext"><?php $posts = get_posts( "category=1&numberposts=1&order=DES" ); ?>
       	<?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
       	<img class="imagespacer"
                               <?php
       $szPostContent = $post->post_content;
       $szSearchPattern =  '/src="(.*?)"/';
   
       // Run preg_match_all to grab all the images and save the results in $aPics
       preg_match_all( $szSearchPattern, $szPostContent, $aPics );
   
       // Check to see if we have at least 1 image
       $iNumberOfPics = count($aPics[0]);
   
       if ( $iNumberOfPics > 0 ) {
          // Now here you would do whatever you need to do with the images
          // For this example the images are just displayed
          for ( $i=0; $i < $iNumberOfPics ; $i++ ) {
               echo $aPics[0][$i];
          };
       }; ?>
       align="right" height=200 >
                               <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
   
                           <?php the_excerpt("Continue reading '" . the_title('', '', false) . "'"); ?> 
   
       						<div class="readmorefeatured"><a href="<?php the_permalink(); ?>">Read more...</a></div>
       						<?php endforeach; ?> <?php endif; ?>
       						</div>
                               <br />
                           </div>
                        </div>
                       <div class="greybarmain"></div>
                       <!-- right side -->
       						<div id="minirant"><?php $posts = get_posts( "category=10&numberposts=1" ); ?>
       	<?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
       						<h5>MiniRant</h5>
       						<strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong>
       						<?php the_content(); ?>
       						<?php endforeach; ?> <?php endif; ?>
       						<br />
       						<a href="rantarchive.php">Read more MiniRants</a>
       						</div>
       						<div id="cartoon">
       						</div>
       				<!--end right side -->
                        <div id="newslist"><div class="newslistnews"><?php $posts = get_posts( "category=1&numberposts=1&offset=1&order=DES" ); ?>
       	<?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
       	<h5><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h5>
       		<?php the_excerpt(); ?>
       		<div class="readmorefeatured"><a href="<?php the_permalink(); ?>">Read more...</a>
       		<div class="greybarmainsmall"></div>
       <?php endforeach; ?> <?php endif; ?>
       						</div>
                   <div class="newslistnews"><?php $posts = get_posts( "category=1&offset=2&numberposts=3&order=DES" ); ?>
       	<?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
                               <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
   
                           <?php the_excerpt("Continue reading '" . the_title('', '', false) . "'"); ?> 
   
       						<div class="readmorefeatured"><a href="<?php the_permalink(); ?>">Read more...</a></div>
       						<div class="greybarmainsmall"></div>
       						<?php endforeach; ?> <?php endif; ?>
       						</div>
       						<div class="newslistnews"><?php $posts = get_posts( "category=1&offset=5&numberposts=1&order=DES" ); ?>
       	<?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
                               <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
   
                           <?php the_excerpt("Continue reading '" . the_title('', '', false) . "'"); ?> 
   
       						<div class="readmorefeatured"><a href="<?php the_permalink(); ?>">Read more...</a></div>
       						<?php endforeach; ?> <?php endif; ?></div>
       						<br />
       						<div class="browsearchives"><a href="archives.php">Browse our Archives</a></div>
       						</div>
   
                   </div>
       <div class="greybarbottom"></div>
       </div>
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [chrismitchell57](https://wordpress.org/support/users/chrismitchell57/)
 * (@chrismitchell57)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/posts-not-displaying-anything/#post-1329865)
 * bump!
 *  Thread Starter [chrismitchell57](https://wordpress.org/support/users/chrismitchell57/)
 * (@chrismitchell57)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/posts-not-displaying-anything/#post-1329922)
 * bump! please help me with this.. its driving me crazy!

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

The topic ‘Posts not displaying anything’ is closed to new replies.

## Tags

 * [not displaying](https://wordpress.org/support/topic-tag/not-displaying/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [chrismitchell57](https://wordpress.org/support/users/chrismitchell57/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/posts-not-displaying-anything/#post-1329922)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
