WordPress.org

Ready to get started?Download WordPress

Forums

Single.php failing (4 posts)

  1. gatessg
    Member
    Posted 1 year ago #

    Hello,

    I am currently developing a new theme but my permalinks from my blog will not link to single.php

    I have a single.php created and a 404.php created. Whenever I click the title of a post it redirects me to my 404 page instead of my single.php.

    Here is loop code on the index.php

    <div id="container"> <!-- THIS IS WHERE THE LOOP STARTS -->
    			<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    
    				<div class="post" id="post-<?php the_ID() ?>">
    					<h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>
    
    					<?php the_post_thumbnail(); ?>
    
    					<div class="content">
    						<?php the_content(); ?>
    
    						<p class="postmetadata">
    	<?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?><br />
    	<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>
    						</p>
    
    					</div> <!-- content -->
    
    				</div> <!-- post -->
    
    			<?php endwhile; ?>
    
    				<div class="navigation">
    					<?php posts_nav_link('','back','next'); ?>
    				</div>
    
    			<?php else: ?>
    				<div class="post">
    					<h2><?php _e('Not Found'); ?></h2>
    				</div>
    
    			<?php endif; ?>
    		</div> <!-- containter******* THIS IS WHERE THE LOOP ENDS-->
  2. gatessg
    Member
    Posted 1 year ago #

    PS. Should i put a ";" after the_ID()?

    <div class="post" id="post-<?php the_ID(); ?>">

    This however isn't fixing the issue i'm just wondering if that should be there as well for future reference. Thanks so much in advance!

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    what are the permalink settings of your site?

    http://codex.wordpress.org/Using_Permalinks

  4. gatessg
    Member
    Posted 1 year ago #

    The Sweeper & Moderator
    Posted 16 seconds ago #

    what are the permalink settings of your site?

    http://codex.wordpress.org/Using_Permalinks

    I have it send to the "default setting" but have tried a few different onces and have seen no results.

Topic Closed

This topic has been closed to new replies.

About this Topic