• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP thematic_navigation_above函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中thematic_navigation_above函数的典型用法代码示例。如果您正苦于以下问题:PHP thematic_navigation_above函数的具体用法?PHP thematic_navigation_above怎么用?PHP thematic_navigation_above使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了thematic_navigation_above函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: thematic_sidebar

	<aside class="leftCol">

		<?php 
thematic_sidebar();
?>

	</aside>

	<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();
?>
 
开发者ID:jentanbernardus,项目名称:Thematic-html5boilerplate,代码行数:30,代码来源: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_above函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP thematic_navigation_below函数代码示例发布时间:2022-05-23
下一篇:
PHP thematic_belowpost函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap