Hi. I am developing a website for a gallery (www.gransar.net/gallery) and I
would like to use auto-focus theme with a custom-designed home page.
The home page has two loops calling for a feature post and the last invitation
post . No matter what I do one of the loops don't work. I changed the theme
to twentyten and my code worked fine. I would like to know if using autofocus
will make this easier ... if so I would purchase it right now -- but even with that
I would have to have custom-designed home page. I would really appreciate any
help. Thank you very much.
here is the code:
<?php
/*
Template Name: Home
*/
?>
<?php
// calling the header.php
get_header();
// action hook for placing content above #container
thematic_abovecontainer();
?>
<div id="container">
<div id="content">
<!-- get styling to work... !-->
<p> this is the first loop </p>
<?php $invitation_query = new WP_Query('tag=invite&showposts=1');
while ($invitation_query->have_posts()) : $invitation_query->the_post(); update_post_caches($posts);?>
$do_not_duplicate = $post->ID;
<!-- styling goes here -->
<div id="nav-above" class="navigation">
<div class="nav-previous" style="height:170px;"><span class="meta-nav"><?php previous_image_link( false, '←' ) ?></span></div>
<div class="nav-next" style="height:170px;"><span class="meta-nav"><?php next_image_link( false, '→' ) ?></span></div>
</div>
<!-- styling ends here -->
<?php endwhile; ?>
<!-- anything after feature post goes here -->
<p> this is next loop</p>
<?php rewind_posts();?>
<?php wp_reset_query();?>
<?php $latestPost_query = new WP_Query ('tag=art&showposts=1');
while ($latestPost_query->have_posts()) : $latestPost_query->the_post(); update_post_caches($posts)?>
<?php if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
<!-- styling goes here -->
<!-- styling goes here -->
<div id="nav-above" class="navigation">
<div class="nav-previous" style="height:170px;"><span class="meta-nav"><?php previous_image_link( false, '←' ) ?></span></div>
<div class="nav-next" style="height:170px;"><span class="meta-nav"><?php next_image_link( false, '→' ) ?></span></div>
</div>
<!-- styling ends here -->
<?php endwhile; ?>
<!-- anything after feature post goes here -->
<p> after the loops</p>
<?php
// calling the widget area 'page-top'
get_sidebar('page-top');
// the_post();
?>
<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class() ?>">
<?php
// creating the post header
thematic_postheader();
?>
<div class="entry-content">
<?php
the_content();
//wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'thematic'), "</div>\n", 'number');
//edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>') ?>
</div>
<?php //autofocus_postfooter(); ?>
</div><!-- .post -->
<?php
// if ( get_post_custom_values('comments') )
// thematic_comments_template(); // Add a key/value of "comments" to enable comments on pages!
// calling the widget area 'page-bottom'
get_sidebar('page-bottom');
?>
</div><!-- #content -->
</div><!-- #container -->
<?php
// action hook for placing content below #container
thematic_belowcontainer();
// calling the standard sidebar
thematic_sidebar();
// calling footer.php
get_footer();
?>