當前位置: 首頁>>代碼示例>>PHP>>正文


PHP thematic_navigation_below函數代碼示例

本文整理匯總了PHP中thematic_navigation_below函數的典型用法代碼示例。如果您正苦於以下問題:PHP thematic_navigation_below函數的具體用法?PHP thematic_navigation_below怎麽用?PHP thematic_navigation_below使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了thematic_navigation_below函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: thematic_abovecontent

	<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();
開發者ID:jentanbernardus,項目名稱:Thematic-html5boilerplate,代碼行數:31,代碼來源:template-blog.php

示例2: pickle_indexloop

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)
//.........這裏部分代碼省略.........
開發者ID:jhgreenblatt,項目名稱:Pickle--Please,代碼行數:101,代碼來源:functions.php


注:本文中的thematic_navigation_below函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。