Support » Themes and Templates » Changed Permalink Structure – Now has_posts doesn’t work in php file, any ideas?

  • I recently went from the default permalink structure to this type of structure -> /%year%/%monthnum%/%day%/%postname%/%postname%.html

    Before I did this, the following code worked without any problems:

    	if ( have_posts() ) : while ( have_posts() ) : the_post();
    	<div class="post" id="post-<?php the_ID(); ?>">
    	     <h3 class="storytitle">
    			<a href="<?php the_permalink() ?>" target="_blank" rel="bookmark"><?php the_title(); ?></a></h3>
    	    <div class="storycontent">
    	        <?php the_content(__('(more...)')); ?>
    	    <p>This post was written by <?php the_author_firstname(); ?> <?php the_author_lastname(); ?> at <?php the_time(); ?> and was</p>
    		<p>posted in the following categories: <?php the_category(' |'); ?></p>
    		<?php if ( comments_open() ) : ?>
    		<?php comments_popup_link( 'No comments yet', '1 comment', '% comments so far', 'comments-link', 'Comments are off for this post'); ?>
    		<?php endif; ?>
    	<?php endwhile; else: ?>
    	<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    	<?php endif; ?>

    I have looked all over trying to figure this out and the only option is to revert back to the default structure which is not what I want to do. I’m sure it’s something I have overlooked but at this point I cannot for the life of me figure out what it is.

    The server is running Apache 1.3.37, WordPress 2.6, PHP 5.2.2 on a Linux Machine.

    Any help would be greatly appreciated!

    Thank you,

    Paul 🙂

  • The topic ‘Changed Permalink Structure – Now has_posts doesn’t work in php file, any ideas?’ is closed to new replies.