WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Permalink and problem with including posts on a external webpage (3 posts)

  1. Damien15
    Member
    Posted 1 year ago #

    I want to activate permalink on my blog however everytime I do, my standalone php pages lose the ability to show posts from a certain catagory.

    Soon as I set it back to default it works again.

    The code I am using on my stand along php pages is below.

    What am I doing wrong/missing. Many Thanks

    <?php query_posts($query_string . '&cat=7'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
     <div class="post">
    
     <!-- Display the Title as a link to the Post's permalink. -->
     <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
    
     <!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
     <small>Published <?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
    
      <div class="entry">
        <?php the_content(); ?>
      </div>
    	 <hr style="color: #000000"></hr>
    <p></p>
     </div> <!-- closes the first div box -->
    
     <?php endwhile; else: ?>
     <p>Sorry, no posts matched your criteria.</p>
     <?php endif; ?>
    
    		<p>&nbsp;</p>
    		<h3>Past One Off Events<a name="PastEvents"></a></h3>
    		<p>&nbsp;</p>
    <?php query_posts($query_string . '&cat=8'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
     <div class="post">
    
     <!-- Display the Title as a link to the Post's permalink. -->
     <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
    
     <!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
     <small>Published <?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
    
      <div class="entry">
        <?php the_content(); ?>
      </div>
    	  <hr style="color: #000000"></hr>
    <p></p>
     </div> <!-- closes the first div box -->
    
     <?php endwhile; else: ?>
     <p>Sorry, no posts matched your criteria.</p>
     <?php endif; ?>
  2. Damien15
    Member
    Posted 1 year ago #

    I have also tried it with no pluggins installed on the blog

  3. Damien15
    Member
    Posted 1 year ago #

    Could this be a htaccess problem??

Topic Closed

This topic has been closed to new replies.

About this Topic