当前位置: 首页>>代码示例>>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;未经允许,请勿转载。