Sticky post in blog home: change style and display

For sticky post in blog home show only header with title,
change background and add show ribbon
This commit is contained in:
fabrixxm 2018-02-19 15:42:23 +01:00
commit daf65232f1
3 changed files with 40 additions and 5 deletions

View file

@ -6,7 +6,13 @@
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php edit_post_link(); ?>
<?php if ( !is_search() ) get_template_part( 'entry', 'meta' ); ?>
</header>
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
<?php if ( !is_search() ) get_template_part( 'entry-footer' ); ?>
<?php
if (is_home() && is_sticky() ) {
// only title for sticky in blog home
} else {
get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) );
if ( !is_search() ) get_template_part( 'entry-footer' );
}
?>
</article>
<hr style="clear:both;">