Since Wordpress sticky posts feature allow the post checked as sticky in post publish panel to be placed at the top of the front page of posts. I was also intended to style the sticky post differently than normal ones within the loop by customizing The Loop default coding as following:
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; $c=0;?>
<?php while (have_posts()) : the_post(); $do_not_duplicate = $post->ID; ?>
<?php $c++;
if( is_home() && !$paged && $c == 1) :?>
<?php get_template_part( 'includes/sticky-post', 'page' ); ?>
<?php else :?>
<?php get_template_part( 'includes/loop-post', 'page' ); ?>
<?php endif;?>
<?php endwhile; ?>
<?php endif; ?>
Where template parts includes/sticky-post
and includes/loop-post
have post content layout for sticky and normal ones respectively, I still having sticky post twice. Once at the top as required with assigned layout and the other at its normal order of publish date within normal posts which I seeking help to get rid of this issue of duplication.
Any help is much appreciated.