Support » Themes and Templates » removing automatic sticky post from theme

  • esterne


    I’m using Portfolio Press and it automatically keeps the latest post entry ‘sticky’ and at the top of all pages. My posts are too long for this and I want to remove the code. Just not sure which code controls this.

    any help out there? Thanks!

Viewing 1 replies (of 1 total)
  • MichaelH


    With the help of the Template Hierarchy article, determine what Template is displaying your posts (could be index.php). Then edit that Template and delete the code that displays that post.

    The code will look like:

    <?php $my_query = new WP_Query('showposts=1');
            while ($my_query->have_posts()) : $my_query->the_post();
            $do_not_duplicate = $post->ID; ?>
            <div class="post new" id="post-<?php the_ID(); ?>">
            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
            <div class="info"><div class="comments"><?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?> | This entry was posted on <?php the_time('M d Y'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>  </div></div>
            <div class="content"><?php the_content('Read more &raquo;'); ?></div>
            <div class="meta">
            <div class="tags"><?php the_tags('', ', ', '<br />'); ?></div>
            <div class="cats"><?php the_category(', ') ?></div>
            <?php endwhile; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘removing automatic sticky post from theme’ is closed to new replies.