本文整理汇总了PHP中woo_get_template_part函数的典型用法代码示例。如果您正苦于以下问题:PHP woo_get_template_part函数的具体用法?PHP woo_get_template_part怎么用?PHP woo_get_template_part使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woo_get_template_part函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_query_var
if (get_query_var('paged')) {
$paged = get_query_var('paged');
}
if (get_query_var('page')) {
$paged = get_query_var('page');
}
$paged = intval($paged);
$query_args = array('post_type' => 'post', 'paged' => $paged);
$query_args = apply_filters('woo_blog_template_query_args', $query_args);
// Do not remove. Used to exclude categories from displaying here.
remove_filter('pre_get_posts', 'woo_exclude_categories_homepage', 10);
query_posts($query_args);
if (have_posts()) {
$count = 0;
?>
<div class="fix"></div>
<?php
while (have_posts()) {
the_post();
$count++;
woo_get_template_part('content', get_post_type());
}
// End WHILE Loop
} else {
get_template_part('content', 'noposts');
}
// End IF Statement
woo_loop_after();
woo_pagenav();
开发者ID:pwillems,项目名称:mimosa-contents,代码行数:31,代码来源:loop-blog.php
示例2: get_header
<?php
/**
* Page Template
*
*/
get_header();
?>
<div class="container">
<div id="main-entry">
<?php
if (have_posts()) {
$count = 0;
while (have_posts()) {
the_post();
$count++;
woo_get_template_part('content', 'page');
}
}
?>
</div>
</div>
<?php
get_footer();
开发者ID:juandanceswild,项目名称:aomp-backup,代码行数:31,代码来源:page.php
示例3: get_the_title
echo '<div class="entry-content greySections addLiteMarginTop">';
echo '<div class="whiteCard">';
echo '<h3 class="blueHeaders">' . get_the_title($ID) . '</h3>';
the_content();
echo '</div>';
echo '</div>';
}
} else {
// no posts found
}
if (have_posts()) {
$count = 0;
while (have_posts()) {
the_post();
$count++;
woo_get_template_part('content', 'page-template-business');
// Get the page content template file, contextually.
}
}
woo_loop_after();
?>
</section><!-- /#main -->
<?php
woo_main_after();
?>
<?php
开发者ID:nomad-mystic,项目名称:GPSEN,代码行数:31,代码来源:template-custom-facebook.php
示例4: woo_content_before
<!-- #content Starts -->
<?php
woo_content_before();
?>
<div id="content" class="col-full">
<div id="main-sidebar-container">
<!-- #main Starts -->
<?php
woo_main_before();
?>
<div id="main" class="col-left">
<?php
woo_loop_before();
woo_get_template_part('content', '404');
// Get the 404 content template file, contextually.
woo_loop_after();
?>
</div><!-- /#main -->
<?php
woo_main_after();
?>
<?php
get_sidebar();
?>
</div><!-- /#main-sidebar-container -->
<?php
开发者ID:pwillems,项目名称:mimosa-contents,代码行数:31,代码来源:404.php
示例5: woo_portfolio_page_content
function woo_portfolio_page_content()
{
if (!is_page_template('template-portfolio.php')) {
return;
}
// Show page content first
if (have_posts()) {
the_post();
woo_get_template_part('content', 'page-template-business');
// Use business content so we don't output a page title
}
}
开发者ID:kawaisin,项目名称:boylan-child,代码行数:12,代码来源:theme-actions.php
示例6: woo_get_template_part
if ($count <= $woo_options['woo_magazine_feat_posts'] && !is_paged()) {
woo_get_template_part('content', 'magazine-featured');
continue;
}
$column_count_1++;
$column_count_2++;
?>
<div class="block<?php
if ($column_count_1 > 1) {
echo ' last';
$column_count_1 = 0;
}
?>
">
<?php
woo_get_template_part('content', 'magazine-grid');
?>
</div><!--/.block-->
<?php
if ($column_count_1 == 0) {
?>
<div class="fix"></div><?php
}
// End IF Statement
}
// End WHILE Loop
} else {
get_template_part('content', 'noposts');
}
// End IF Statement
woo_loop_after();
开发者ID:jospintedjou,项目名称:wordpress,代码行数:31,代码来源:loop-magazine.php
示例7: woo_loop_before
global $more;
$more = 0;
// Get taxonomy query object
$taxonomy_archive_query_obj = $wp_query->get_queried_object();
// Taxonomy term name
$taxonomy_term_nice_name = $taxonomy_archive_query_obj->name;
// Taxonomy term slug
$taxonomy_term_slug = $taxonomy_archive_query_obj->slug;
woo_loop_before();
if (have_posts()) {
$count = 0;
$title_before = '<span class="archive_header">';
$title_after = '</span>';
woo_archive_title($title_before, $title_after);
?>
<div class="fix"></div>
<?php
while (have_posts()) {
the_post();
$count++;
woo_get_template_part('content', 'tumblog');
}
// End WHILE Loop
} else {
get_template_part('content', 'noposts');
}
// End IF Statement
woo_loop_after();
woo_pagenav();
开发者ID:jospintedjou,项目名称:wordpress,代码行数:31,代码来源:loop-tumblog.php
示例8: woo_loop_before
woo_loop_before();
if (have_posts()) {
$count = 0;
$title_before = '<h1 class="archive_header">';
$title_after = '</h1>';
echo $title_before . sprintf(__('Search results for "%s"', 'woothemes'), get_search_query()) . $title_after;
?>
<div class="fix"></div>
<?php
if (function_exists('relevanssi_didyoumean')) {
relevanssi_didyoumean(get_search_query(), "<p>Did you mean: ", "</p><br>", 5);
}
while (have_posts()) {
the_post();
$count++;
if (get_option('woo_woo_tumblog_switch') == 'true') {
$is_tumblog = woo_tumblog_test();
} else {
$is_tumblog = false;
}
woo_get_template_part('content', 'search');
}
// End WHILE Loop
} else {
get_template_part('content', 'noposts');
}
// End IF Statement
woo_loop_after();
woo_pagenav();
开发者ID:klgrimley,项目名称:mzf,代码行数:31,代码来源:loop-search.php
示例9: load_component
/**
* Load the desired component, if a method is available for it.
* @param string $component The component to potentially be loaded.
* @since 5.0.8
* @return void
*/
protected function load_component($component)
{
switch ($component) {
case 'blog':
get_template_part('loop', 'blog');
break;
case 'business-slider':
echo '<div class="business">' . "\n";
woo_slider_biz();
echo '</div>' . "\n";
break;
case 'magazine-slider':
echo '<div class="magazine">' . "\n";
woo_slider_magazine();
echo '</div>' . "\n";
break;
case 'magazine-grid':
echo '<div class="magazine">' . "\n";
get_template_part('loop', 'magazine');
echo '</div>' . "\n";
break;
case 'current-page-content':
if (have_posts()) {
$count = 0;
while (have_posts()) {
the_post();
$count++;
woo_get_template_part('content', 'page');
// Get the page content template file, contextually.
}
}
break;
default:
break;
}
}
开发者ID:jospintedjou,项目名称:wordpress,代码行数:42,代码来源:widget-woo-component.php
注:本文中的woo_get_template_part函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论