Help with my blog
-
I developed a simple blog theme for my course, basically just so that we can post up what we have been researching each week, and I didnt want to just use a standard theme – thought it would be good practice to develop my own. Everything is working fine except for one thing – I have used a sticky post as a sort of “introductory” post, which has its own styling…Obviously I only want this sticky post to appear on the top of the first page (which it does), however it also displays half way down the second page of posts directly underneath a blog post… Can anyone help me with this. This is the loop I used
<section id="posts"> <?php if (have_posts ()) : ?> <?php while(have_posts()) : the_post(); ?> <?php if(is_sticky()):?> <article id="sticky_post"><?php the_content(); ?></article> <?php elseif(!is_sticky()):?> <article> <h2 class="post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p class="date"><?php the_time('F jS, Y'); ?><br /> Posted in: <?php the_category(', '); ?></p> <div class="grey"><?php the_content(''); ?></div> <a href="<?php the_permalink(); ?>" class="readmore">Read More...</a> </article> <?php endif;?> <?php endwhile; ?> <ul id="older_newer"> <li id="older"><?php next_posts_link('Older Posts') ?></li> <li id="newer"><?php previous_posts_link('Newer Posts') ?></li> </ul> <?php else : ?> <h2>Nothing Here!</h2> <?php endif; ?> </section>
Any help appreciated. Thanks
Btw the blog is located at https://www.jonathanwallace.co.uk/ if anyone wants to have a look to see what i mean – if you click older posts, the sticky post appears on this page also
- The topic ‘Help with my blog’ is closed to new replies.