• Resolved magicalwonders

    (@magicalwonders)


    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: https://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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sticky Post not Sticking’ is closed to new replies.