Title: Single.php and permalinks
Last modified: August 19, 2016

---

# Single.php and permalinks

 *  [Yeowza](https://wordpress.org/support/users/yeowza/)
 * (@yeowza)
 * [16 years ago](https://wordpress.org/support/topic/singlephp-and-permalinks/)
 * Hello, I am creating a custom theme and having trouble displaying a post with
   single.php,
 * Here is what it looks like currently..
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       <?php post_class('',$post_id); ?>
   
       <h1><?php the_title(); ?></h1>
   
       <?php the_content(); ?>
       <?php comments_template(); ?>
   
       <?php endwhile; else: ?>
   
       <p>Sorry, no posts matched your criteria.</p>
   
       <?php endif; ?>
       ```
   
 * It works fine as long as permalink structure is ?p=1
 * But when I change permalink to anything else then none of my future posts work
   for some reason
 * Any help is greatly appreciated.

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

 *  Thread Starter [Yeowza](https://wordpress.org/support/users/yeowza/)
 * (@yeowza)
 * [16 years ago](https://wordpress.org/support/topic/singlephp-and-permalinks/#post-1490746)
 * Ah crap, sorry, I didn’t see the notice about .htaccess
 *  [Eric Daams](https://wordpress.org/support/users/ericdaams/)
 * (@ericdaams)
 * [16 years ago](https://wordpress.org/support/topic/singlephp-and-permalinks/#post-1490747)
 * Did you update your .htaccess after making the permalink change? That’s the only
   thing I can think of that would cause this.
 * Eric

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

The topic ‘Single.php and permalinks’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [Eric Daams](https://wordpress.org/support/users/ericdaams/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/singlephp-and-permalinks/#post-1490747)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
