[theme-reviewers] Sticky Posts appear twice in loop
Ronnel Angelo
ronnel.angelo at gmail.com
Fri Feb 28 05:05:06 UTC 2014
The duplication is normal. A sticky post is supposed to show up twice.
On Fri, Feb 28, 2014 at 12:47 PM, Phillip Wells
<phillipwells at hotmail.co.nz>wrote:
> Hi i am developing my own theme and i have ran into an issue i am confused
> with where my sticky posts appear as the first outputted posts and they
> appear again about halfway through where they would be placed if they were
> not sticky posts. I am not sure how to get rid of this duplication.
>
> The code i am using is below:
>
> <?php if (have_posts()) : ?>
>
> <?php while (have_posts()) : the_post(); ?>
> <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
> <h2 class="post_heading"><a href="<?php the_permalink()
> ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s',
> 'platinum'), the_title_attribute('echo=0')); ?>"><?php if(the_title( '',
> '', false ) !='') the_title(); else echo 'Untitled';?></a></h2>
> <div class="meta">Posted in <?php printf(__('in %s',
> 'platinum'), get_the_category_list(', ')); ?> | Date: <?php the_time(__('F
> jS, Y', 'platinum')) ?> | Posted by <?php
> the_author_posts_link(); ?> | <?php the_tags(__('Tags:',
> 'platinum') . ' ', ', ', '<br />'); ?> | <?php
> comments_popup_link(__('No comments', 'platinum'), __('1 comment',
> 'platinum'), __('% comments', 'platinum'), '', __('comments Closed',
> 'platinum') ); ?></div>
>
>
> <?php /* The post thumbnail */
> if ( has_post_thumbnail( get_the_ID() ) ) { ?>
> <div class="image_frame image_fl"><a href="<?php the_permalink() ?>"
> rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s',
> 'graphene' ), the_title_attribute( 'echo=0' ) ); ?>">
> <?php the_post_thumbnail( apply_filters(
> 'platinum_excerpt_thumbnail_size', 'thumbnail' ) ); ?>
> </a></div>
> <?php
> } else {
> echo platinum_get_post_image( get_the_ID(), apply_filters(
> 'platinum_excerpt_thumbnail_size', 'thumbnail' ), 'excerpt' );
> }
> ?>
>
> <?php the_content(__('<span class="more float_r"></span>', 'platinum'));
> ?><br /><p class="postmetadata"><?php the_tags(__('Tags:', 'platinum') . '
> ', ', ', '<br />'); ?> <?php edit_post_link(__('Edit this post',
> 'platinum'), '', ''); ?></p>
>
> <div class="cleaner"></div>
> </div>
> <?php endwhile; ?>
> <div class="post">
> <div class="navigation">
> <div class="alignleft" style="float:left;"><?php
> next_posts_link(__('« Older Entries', 'platinum')) ?></div>
> <div class="alignright" style="float:right;"><?php
> previous_posts_link(__('Newer Entries »', 'platinum')) ?></div>
> </div>
>
> <?php else : ?>
>
> <h2 class="center"><?php _e('Not Found', 'platinum'); ?></h2>
> <p class="center"><?php _e('Sorry, but you are looking for something that
> isn’t here.', 'platinum'); ?></p>
> <?php get_search_form(); ?>
>
> <?php endif; ?>
>
> I have been searching everywhere for an answer but i cannot find one. I
> have even tried searching the twenty fourteen theme and i cannot see what i
> am doing wrong.
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140228/caf3c7f5/attachment-0001.html>
More information about the theme-reviewers
mailing list