Cátia Kitahara
Member
Posted 3 years ago #
Hi, guys,
I think it would be nice to add a class to the sticky posts, so we can give it a different style.
Other thing is that this option is too hidden in the "add new post page", it wasn't easy to find. I wasn't the only one with this same difficulty.
In 2.7 Classic and Default templates it was changed but if your not using them in your index.php/archive.php/(and any other post list templates)
Find:
<div class="post" id="post-<?php the_ID(); ?>">
an add "<?php sticky_class(); ?>" as so:
<div class="post<?php sticky_class(); ?>" id="post-<?php the_ID(); ?>">
Cátia Kitahara
Member
Posted 3 years ago #
Thanks, I wasn't aware of that. And I discovered too that now there's a new function called post_class() which adds classes to the element where the post is in. For those who had the same question look at these codex informations.