WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Permalink and problem with including posts on a external webpage

[Resolved] Permalink and problem with including posts on a external webpage

  • 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; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Permalink and problem with including posts on a external webpage’ is closed to new replies.
Skip to toolbar