Title: single.php isn&#039;t working right
Last modified: August 19, 2016

---

# single.php isn't working right

 *  [noeg](https://wordpress.org/support/users/noeg/)
 * (@noeg)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/)
 * I think my single page is jacked up I’m testing a theme I made to change my site
   and when I click the posts link to go to the single post nothing shows and it
   looks like it the title says page not found
 *     ```
       <?php get_header(); ?>
   
       		<div id="content">
       				<?php query_posts($query_string . '&cat=-3'); ?>
       				<?php if(have_posts()):?>
       					<?php while(have_posts()):the_post();?>
       		<!-- loop starts// contains the loop-->
       			<div class="date-info">
       				<div class="date"><?php the_time('d'); ?></div>
       				<div class="day"><?php the_time('M'); ?></div>
   
       			</div>
   
       			<div class="post-info">
       				<div class="post-title">
       					<h2 class="post-title"><a href="<?php the_permalink();?>"title="<?php the_title();?>"><?php the_title();?></a></h2>
       				</div>
   
       				<div class="post-meta">
       					Posted By <?php the_author();?> / In <?php the_category(',')?> / With <?php comments_popup_link('No Comments','1 Comments','% Comments');?>
       				</div>
   
       				<div class="post">
       					<?php the_content();?>
       						<?wp_link_pages();?>
       							<?php edit_post_link('Edit','<p>','</p>');?>
       								<h3>Was this post helpful?</h3>Get Updates, subscribe to the <img src="/wp-content/themes/templafied/images/smallrss.png" />RSS Feed<br /><br />
   
       								<h3>Please bookmark and share</h3>
       									<ul>
       										<li><a href=”http://stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>”><img src="/wp-content/themes/templafied/images/stumbleupon.png" alt="stumble" /></a></li>
       										<li><a href="http://digg.com/submit?phase=2&url= <?php the_permalink();?>&title=<?php the_title();?>"><img src="/wp-content/themes/templafied/images/digg.png" alt="digg" /></a></li>
       										<li><a href="http://del.icio.us/post?v=4&noui&jump=close&url=<?php the_permalink();?>&title=<?php the_title();?>"><img src="/wp-content/themes/templafied/images/delicious.png" alt="delicious" /></a>
   
       									</ul>
       				</div>		
   
       			</div>
       		<!--Loop Ends -->
       		<?php endwhile;?>
       			<?php endif;?>
       	</div>
   
       		<?php get_sidebar(); ?>	
   
       		<?php get_footer(); ?>
       ```
   
 * is something wrong with my single.php file?

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

 *  [Moodles](https://wordpress.org/support/users/moodles/)
 * (@moodles)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/#post-1846622)
 * Your loop says to exclude category ID 3, are you trying to view a post in that
   category?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/#post-1846627)
 * try to add a `global $query_string;`
 * > For example, to set the display order of the posts without affecting the rest
   > of the query string, you could place the following before The Loop:
   >     ```
   >     global $query_string;
   >     query_posts($query_string . "&order=ASC");
   >     ```
   > 
 * [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 *  Thread Starter [noeg](https://wordpress.org/support/users/noeg/)
 * (@noeg)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/#post-1846647)
 * well no theres nothing wrong with my loop all the posts that I want to show do
   and the ones I dont want to show dont show I believe its a problem with single
   posts like say you click the permalink to the post it wont show anything try 
   it..
    [http://www.templafied.com](http://www.templafied.com)
 *  Thread Starter [noeg](https://wordpress.org/support/users/noeg/)
 * (@noeg)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/#post-1846649)
 * I kinda need this question answered cause the error is on a live website can 
   anyone help?
 *  [Moodles](https://wordpress.org/support/users/moodles/)
 * (@moodles)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/#post-1846701)
 * Sorry, I’m just not see what’s wrong.
 * Make sure your loop is correct. Did you try alchymyth’s suggestion?

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

The topic ‘single.php isn't working right’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Moodles](https://wordpress.org/support/users/moodles/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/singlephp-isnt-working-right/#post-1846701)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
