Forums

[resolved] Sticky Post not Sticking (2 posts)

  1. magicalwonders
    Member
    Posted 2 years ago #

    Hello Folks,

    I'm having trouble getting a post I've specified as sticky to stay at the top of the page.

    The url for this page is: http://really-valid-info.com/blog/news/ At the moment the poist I'm trying to make sticky is thye second one down on the page.

    My single.php template includes the following code:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div id="alignleft"><?php previous_post_link('&laquo; %link') ?>
    </div>
    <div id="alignright"><?php next_post_link('%link &raquo;') ?>
    </div>
    
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    	<h2 align="center"><?php the_title(); ?></h2>

    As that didn't work, I added <?php post_class(); ?>> to my index.php, but that also didn't work and has produced class="post hentry category-uncategorized"> onto the page itself.

    I've messed up somewhere with the code, but not sure where.

    Hope someone can advise.

    Myles

  2. magicalwonders
    Member
    Posted 2 years ago #

    Problem solved. I hadn't clicked O.K. before updating post! ooops.

Topic Closed

This topic has been closed to new replies.

About this Topic