WordPress.org

Ready to get started?Download WordPress

Forums

stickys not at top on a query within a page template (3 posts)

  1. Maxaud
    Member
    Posted 4 years ago #

    I have a page template that's similar to the following:

    <?php
    /*
    Template Name: Custom Template
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="content">
                		<h1><?php the_title(); ?></h1>
    			<?php if(!is_paged()) { ?>
    				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    					<?php the_content();?>
    				<?php endwhile; else: ?>
    				<?php endif; ?>
    			<?php } ?>
    
    			<div class="clear"></div>
    
    			<?php
    				query_posts('showposts=20&cat=10&paged='.$paged);
    			?>
    
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    			<!-- Do some stuff here -->
    
    			<?php endwhile; else: ?>
    			<?php endif; ?>
    
    			<div class="clear"></div>
    
    	</div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    As you can I see I have the page content at the top, then I have a second loop for posts within a certain category.
    The problem is that the category loop isn't sorting posts with sticky posts at the top.

    I'd imagine this is a quick fix.
    Thanks in advance for any help.

    Dustin

  2. stvwlf
    Member
    Posted 4 years ago #

    Hi

    Stickies only stick on the homepage.

  3. stvwlf
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic