Hi guys,
I'm brand new to all this and these forums are completely amazing. I'm re-designing our company's website (we're an arts festival), using a thematic child theme. I have added a second loop to my homepage, which works great, except that its presence there has caused the sidebar to disappear underneath it - see here: www.lichfieldfestival.org/testingtestingtesting. I can't see any logic for this so need your expert help!
Here's the code for my loops in functions.php:
// Add featured posts to the frontpage underneath the featured content slideshow
function LFS_indexloop() {
query_posts("showposts=3&cat=349");
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
<?php thematic_postheader();
if (has_post_thumbnail()) {
the_post_thumbnail('homepage-featured-image');
} ?>
</div><!-- .post -->
<?php endwhile; else: ?>
<h2>Eek</h2>
<p>There are no posts to show!</p>
<?php endif;
wp_reset_query();
}
// Add Latest News loop underneath the featured posts
function LFS_Latest_News() {
query_posts("showposts=3&cat=31");
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID() ?>" class="<php thematic_post_class() ?>">
<?php thematic_postheader();
if (has_post_thumbnail()) {
the_post_thumbnail('latest-news-image');
}?>
<div class="entry-content">
<?php the_excerpt(); ?>
" class="more"><?php echo more_text() ?>
</div><!-- .post -->
<?php endwhile; else: ?>
<h2>Oh dear!</h2>
<p> Nothing's happening here right now, call again later.</p>
<?php endif;
wp_reset_query();
}
and here are the action loops in home.php (in my child theme directory):
<div id="container">
<?php thematic_abovecontent(); ?>
<div id="content">
<?php
// create the navigation above the content
thematic_navigation_above();
// calling the widget area 'index-top'
get_sidebar('index-top');
// calling the widget area 'index-bottom'
get_sidebar('index-bottom');
// action hook for placing content above the index loop
thematic_above_indexloop();
// action hook creating the index loop
//thematic_indexloop();
//A CUSTOM HOMEPAGE LOOP
LFS_indexloop();
//action hook adding news loop below the featured loop
LFS_Latest_News();
// action hook for placing content below the index loop
thematic_below_indexloop();
// create the navigation below the content
thematic_navigation_below();
?>
</div><!-- #content -->
<?php thematic_belowcontent(); ?>
</div><!-- #container -->
If anyone has any idea why the sidebar is going walkabout and could point me to a solution, I would be insanely grateful. Thank you.