<section id="main" class="main">

		<?php 
thematic_abovecontent();
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
query_posts("paged={$paged}");
// create the navigation above the content
thematic_navigation_above();
// calling the widget area 'index-top'
get_sidebar('index-top');
// action hook for placing content above the index loop
thematic_above_indexloop();
// action hook creating the index loop
thematic_indexloop();
// action hook for placing content below the index loop
thematic_below_indexloop();
// calling the widget area 'index-bottom'
get_sidebar('index-bottom');
// create the navigation below the content
thematic_navigation_below();
thematic_belowcontent();
?>
 

	</section><!-- #main -->

<?php 
// action hook for placing content below #container
thematic_belowcontainer();
// calling footer.php
get_footer();
예제 #2
0
function pickle_indexloop()
{
    //Use php to create a new loop.
    if (is_home() & !is_paged()) {
        //NOTE: this is where angel created divs to hold her loop content and also category header,
        //because she is adding her function as an action hook below_container
        //but in my case, i'm filtering the thematic_indexloop, so no html is necessary here for me.
        //Create a query to use with a loop. Big thanks to Allan Cole - www.allancole.com - for sharing his code!
        // First, grab any global settings you may need for your loop.
        global $paged, $more, $post;
        //the post variable is for calling meta data created with custom write panels
        $more = 0;
        // Second, create a new temporary Variable for your query.
        // $feature_pickle_query is the Variable used in this example query.
        // If you run any new Queries, change the variable to something else more specific ie: $feature_wp_query.
        $temp = $feature_pickle_query;
        // Next, set your new Variable to NULL so it's empty.
        $feature_pickle_query = null;
        // Then, turn your variable int the WP_Query() function.
        $feature_pickle_query = new WP_Query();
        // Set you're query parameters. Need more Parameters?: http://codex.wordpress.org/Template_Tags/query_posts
        $feature_pickle_query->query(array('category_name' => 'featured-pickle', 'showposts' => '1'));
        // Add Previous and Next post links here. (http://codex.wordpress.org/Template_Tags/previous_post_link)
        // Or just use the thematic action.
        thematic_navigation_above();
        // While posts exists in the Query, display them.
        while ($feature_pickle_query->have_posts()) {
            $feature_pickle_query->the_post();
            // Start the looped content here.
            ?>
  
        <div id="post-<?php 
            the_ID();
            ?>
" class="<?php 
            thematic_post_class();
            ?>
">
                
            <div id="post-content">       
                <?php 
            the_post_thumbnail();
            // we just called for the thumbnail
            ?>
                <div class="entry-content">
                     <!-- Display the Title as a link to the Post's permalink. -->
                    <h2 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="Permanent Link to <?php 
            the_title_attribute();
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
                    <?php 
            if (get_post_meta($post->ID, 'pickle-maker')) {
                ?>
<p class="maker_name"><?php 
                echo get_post_meta($post->ID, 'pickle-maker', $single = true);
                ?>
</p><?php 
            }
            ?>
                    <?php 
            echo polldaddy_get_rating_html();
            ?>
                    <?php 
            the_content('Read more...');
            ?>
                </div>
            </div>    
        </div><?php 
            //#featured
        }
        //This is how to end a loop
    }
    // Add Previous and Next post links here. (http://codex.wordpress.org/Template_Tags/previous_post_link)
    // Or us the thematic action.
    thematic_navigation_below();
    // End the Query and set it back to temporary so that it doesn't interfere with other queries.
    $feature_pickle_query = null;
    $feature_pickle_query = $temp;
    // Thats it! End of the feature pickle query.
    //------------------------Now we want to create another loop that shows 6 posts as a gallery below the feature pickle post.
    //------------------------Remember we are still within the same funtion, which is ultimately replacing the index loop.
    //Use php to create a new loop.
    if (is_home() & !is_paged()) {
        // Second, create a new temporary Variable for your query.
        // $front_page_gallery is the Variable used in this example query.
        // If you run any new Queries, change the variable to something else more specific ie: $feature_wp_query.
        $temp = $front_page_gallery;
        // Next, set your new Variable to NULL so it's empty.
        $front_page_gallery = null;
        // Then, turn your variable int the WP_Query() function.
        $front_page_gallery = new WP_Query();
        // Set you're query parameters. Need more Parameters?: http://codex.wordpress.org/Template_Tags/query_posts
        $front_page_gallery->query(array('category_name' => 'front-page-gallery', 'showposts' => '6'));
        // Add Previous and Next post links here. (http://codex.wordpress.org/Template_Tags/previous_post_link)
        // Or just use the thematic action.
        thematic_navigation_above();
        // While posts exists in the Query, display them.
        while ($front_page_gallery->have_posts()) {
            $front_page_gallery->the_post();
            // Start the looped content here.
            ?>
            <div class="gallery_thumb_container">
                <div id="post-<?php 
            the_ID();
            ?>
" class="<?php 
            thematic_post_class();
            ?>
">
                    <?php 
            the_post_thumbnail();
            // we just called for the thumbnail
            ?>
                    <div class="gallery-content">
                        <!-- Display the Title as a link to the Post's permalink. -->
                        <h2 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="Permanent Link to <?php 
            the_title_attribute();
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
                        <?php 
            if (get_post_meta($post->ID, 'pickle-maker')) {
                ?>
<p class="maker_name"><?php 
                echo get_post_meta($post->ID, 'pickle-maker', $single = true);
                ?>
</p><?php 
            }
            ?>
                        <?php 
            echo polldaddy_get_rating_html();
            ?>
                    </div>
                </div>
            </div>
<?php 
        }
        //This is how to end a loop
    }
    // Add Previous and Next post links here. (http://codex.wordpress.org/Template_Tags/previous_post_link)
    // Or us the thematic action.
    thematic_navigation_below();
    // End the Query and set it back to temporary so that it doesn't interfere with other queries.
    $front_page_gallery = null;
    $front_page_gallery = $temp;
    ?>

<?php 
    // Thats it! End of front page gallery.
}