How To Remove Header From Sticky Post In WordPress Blog?

Posted by

Hi,

You need to edit the index.php file of your current active theme of your blog to remove Header from sticky post. Check this code in the file:

Original Code:
<span class=”PostHeader”>
<a title=”Permanent Link to <?php the_title(); ?>” rel=”bookmark” href=”<?php the_permalink() ?>”><?php the_title(); ?></a>
</span>

Replace with:
<span class=”PostHeader”>
<?php if(!is_sticky()) :?><a title=”Permanent Link to <?php the_title(); ?>” rel=”bookmark” href=”<?php the_permalink() ?>”><?php the_title(); ?></a>
<?php else the_title();endif;?>
</span>

That’s it!

Thanks,

Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.