本文整理汇总了PHP中tie_post_class函数的典型用法代码示例。如果您正苦于以下问题:PHP tie_post_class函数的具体用法?PHP tie_post_class怎么用?PHP tie_post_class使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tie_post_class函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: while
?>
<?php
} else {
?>
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
?>
<div <?php
tie_post_class('recent-item');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" rel="bookmark">
<?php
the_post_thumbnail('tie-medium');
?>
<span class="fa overlay-icon"></span>
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:block-recent.php
示例2: the_post_thumbnail
?>
</a>"><?php
the_post_thumbnail('slider');
?>
<span class="fa overlay-icon"></span></a>
</div><!-- post-thumbnail /-->
</li><!-- .first-news -->
<?php
} else {
?>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<li <?php
tie_post_class('videos-item' . $count);
?>
>
<div class="post-thumbnail">
<a class="ttip" href="<?php
echo $video_link;
?>
" title="<?php
the_title();
?>
" data-options="width: 768 , height: 432" data-title="<a href='<?php
the_permalink();
?>
'><?php
the_title();
?>
开发者ID:sondang86,项目名称:mySite,代码行数:31,代码来源:block-videos.php
示例3: tie_best_reviews_posts
function tie_best_reviews_posts($posts_number = 5, $thumb = true)
{
global $post;
$original_post = $post;
$args = array('orderby' => 'meta_value_num', 'meta_key' => 'taq_review_score', 'posts_per_page' => $posts_number, 'post_status' => 'publish', 'no_found_rows' => true, 'ignore_sticky_posts' => true);
$best_views = new WP_Query($args);
if ($best_views->have_posts()) {
while ($best_views->have_posts()) {
$best_views->the_post();
?>
<li <?php
tie_post_class();
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $thumb) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" rel="bookmark"><?php
the_post_thumbnail('tie-small');
?>
<span class="fa overlay-icon"></span></a>
</div><!-- post-thumbnail /-->
<?php
}
?>
<h3><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h3>
<?php
tie_get_score();
?>
<?php
tie_get_time();
?>
</li>
<?php
}
}
$post = $original_post;
wp_reset_query();
}
开发者ID:khanhhoang288,项目名称:anc_shf,代码行数:50,代码来源:theme-functions.php
示例4: get_home_news_videos
function get_home_news_videos($cat_data)
{
$Cat_ID = $cat_data['id'];
$offset = $Box_Title = '';
if (!empty($cat_data['title'])) {
$Box_Title = $cat_data['title'];
}
if (!empty($cat_data['offset'])) {
$offset = $cat_data['offset'];
}
$count = 0;
$cat_query = new WP_Query(array('cat' => $Cat_ID, 'posts_per_page' => 4, 'offset' => $offset, 'no_found_rows' => 1, 'meta_query' => array('relation' => 'OR', array('key' => 'tie_video_url', 'value' => ' ', 'compare' => '!='), array('key' => 'tie_embed_code', 'value' => ' ', 'compare' => '!='))));
?>
<section class="cat-box video-box clear">
<div class="cat-box-title">
<h2><a href="<?php
echo get_category_link($Cat_ID);
?>
"><?php
if (function_exists('icl_t')) {
echo icl_t(theme_name, $cat_data['boxid'], $Box_Title);
} else {
echo $Box_Title;
}
?>
</a></h2>
<div class="stripe-line"></div>
</div><!-- post-thumbnail /-->
<div class="cat-box-content">
<?php
if ($cat_query->have_posts()) {
?>
<ul>
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
$count++;
?>
<?php
if ($count == 1) {
?>
<li <?php
tie_post_class('big-video-column');
?>
>
<?php
tie_video();
?>
</li><!-- .first-news -->
<?php
} else {
?>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<li <?php
tie_post_class('videos-item' . $count);
?>
>
<div class="post-thumbnail">
<a class="ttip" href="<?php
the_permalink();
?>
" title="<?php
the_title();
?>
" rel="bookmark"><?php
tie_thumb('tie-medium');
?>
<span class="overlay-icon"></span></a>
</div><!-- post-thumbnail /-->
</li>
<?php
}
?>
<?php
}
?>
<?php
}
?>
</ul>
<div class="clear"></div>
<?php
}
?>
</div><!-- .cat-box-content /-->
</section><!-- Videos Box -->
<?php
}
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:93,代码来源:home-cat-videos.php
示例5: the_permalink
?>
</p>
<a class="more-link" href="<?php
the_permalink();
?>
"><?php
_eti('Read More »');
?>
</a>
</div>
</li><!-- .first-news -->
<?php
} else {
?>
<li <?php
tie_post_class();
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" rel="bookmark"><?php
the_post_thumbnail('tie-small');
?>
<span class="fa overlay-icon"></span></a>
</div><!-- post-thumbnail /-->
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:block-tabs.php
示例6: while
<div class="post-listing">
<?php
while (have_posts()) {
the_post();
?>
<article <?php
tie_post_class('item-list');
?>
>
<h2 class="post-box-title">
<a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a>
</h2>
<?php
get_template_part('framework/parts/meta-archives');
?>
<div class="entry">
<?php
the_content(__ti('Read More »'));
?>
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:loop-content.php
示例7: tie_home_tabs
function tie_home_tabs()
{
$home_tabs_active = tie_get_option('home_tabs_box');
$home_tabs = tie_get_option('home_tabs');
$Posts = 5;
if ($home_tabs_active && $home_tabs) {
?>
<div id="cats-tabs-box" class="cat-box-content clear cat-box">
<div class="cat-tabs-header">
<ul>
<?php
foreach ($home_tabs as $cat) {
?>
<li><a href="#catab<?php
echo $cat;
?>
"><?php
echo get_the_category_by_ID($cat);
?>
</a></li>
<?php
}
?>
</ul>
</div>
<?php
$cat_num = 0;
foreach ($home_tabs as $cat) {
$count = 0;
$cat_num++;
$cat_query = new WP_Query('cat=' . $cat . '&no_found_rows=1&posts_per_page=' . $Posts);
?>
<div id="catab<?php
echo $cat;
?>
" class="cat-tabs-wrap cat-tabs-wrap<?php
echo $cat_num;
?>
">
<?php
if ($cat_query->have_posts()) {
?>
<ul>
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
$count++;
?>
<?php
if ($count == 1) {
?>
<li <?php
tie_post_class('first-news');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
<?php
tie_thumb('tie-medium');
?>
<span class="overlay-icon"></span>
</a>
</div><!-- post-thumbnail /-->
<?php
}
?>
<h2 class="post-box-title"><a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php
the_title();
?>
</a></h2>
<?php
get_template_part('includes/boxes-meta');
?>
<div class="entry">
<?php
tie_excerpt_home();
?>
<a class="more-link" href="<?php
the_permalink();
?>
"><?php
//.........这里部分代码省略.........
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:101,代码来源:home-cat-tabs.php
示例8: while
?>
<div class="cat-box-content">
<?php
if ($cat_query->have_posts()) {
?>
<div id="slideshow<?php
echo $cat_id;
?>
" class="group_items-box">
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
?>
<div <?php
tie_post_class('scroll-item');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" rel="bookmark">
<?php
the_post_thumbnail('tie-medium');
?>
<span class="fa overlay-icon"></span>
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:block-scroll.php
示例9: tie_best_reviews_posts
function tie_best_reviews_posts($pop_posts = 5, $thumb = true)
{
global $post;
$orig_post = $post;
$cat_query1 = new WP_Query(array('posts_per_page' => $pop_posts, 'orderby' => 'meta_value_num', 'meta_key' => 'tie_review_score', 'post_status' => 'publish', 'no_found_rows' => 1));
while ($cat_query1->have_posts()) {
$cat_query1->the_post();
?>
<li <?php
tie_post_class();
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $thumb) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" title="<?php
printf(__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php
tie_thumb();
?>
<span class="overlay-icon"></span></a>
</div><!-- post-thumbnail /-->
<?php
}
?>
<h3><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h3>
<?php
tie_get_score();
?>
<span class="date"><?php
tie_get_time();
?>
</span>
</li>
<?php
}
$post = $orig_post;
}
开发者ID:anakhha,项目名称:sahifa,代码行数:50,代码来源:theme-functions.php
示例10: get_home_cats
function get_home_cats($cat_data)
{
?>
<?php
global $count2;
$Cat_ID = $cat_data['id'];
$rand = $offset = $order = $Posts = '';
if (!empty($cat_data['number'])) {
$Posts = $cat_data['number'];
}
if (!empty($cat_data['order'])) {
$order = $cat_data['order'];
}
if (!empty($cat_data['offset'])) {
$offset = $cat_data['offset'];
}
if ($order == 'rand') {
$rand = "&orderby=rand";
}
$cat_query = new WP_Query('cat=' . $Cat_ID . '&no_found_rows=1&posts_per_page=' . $Posts . $rand . '&offset=' . $offset);
$cat_title = get_the_category_by_ID($Cat_ID);
$count = 0;
$home_layout = $cat_data['style'];
?>
<?php
if ($home_layout == '2c') {
//************** 2C ******************************************************
?>
<?php
$count2++;
?>
<section class="cat-box column2 <?php
if ($count2 == 2) {
echo 'last-column';
$count2 = 0;
}
?>
">
<div class="cat-box-title">
<h2><a href="<?php
echo get_category_link($Cat_ID);
?>
"><?php
echo $cat_title;
?>
</a></h2>
<div class="stripe-line"></div>
</div><!-- post-thumbnail /-->
<div class="cat-box-content">
<?php
if ($cat_query->have_posts()) {
?>
<ul>
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
$count++;
?>
<?php
if ($count == 1) {
?>
<li <?php
tie_post_class('first-news');
?>
>
<div class="inner-content">
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
<?php
tie_thumb('tie-medium');
?>
<span class="overlay-icon"></span>
</a>
</div><!-- post-thumbnail /-->
<?php
}
?>
<h2 class="post-box-title"><a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php
the_title();
?>
</a></h2>
//.........这里部分代码省略.........
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:101,代码来源:home-cats.php
示例11: get_the_time
$timeline_time = get_the_time('F, Y');
?>
<h2 class="timeline-head"><?php
echo $timeline_time;
?>
</h2>
<div class="clear"></div>
<ul class="timeline">
<?php
}
?>
<li <?php
tie_post_class('timeline-post');
?>
>
<div class="timeline-content">
<span class="timeline-date"><?php
echo get_the_time('j F');
?>
</span>
<h2 class="post-box-title">
<a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a>
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:loop-timeline.php
示例12: query_posts
}
query_posts(array('paged' => $paged, 'category__in' => $tie_blog_cats));
?>
<div id="featured-posts">
<?php
$i = 0;
while (have_posts()) {
the_post();
$i++;
?>
<div class="featured-post featured-post-<?php
echo $i;
?>
">
<div <?php
tie_post_class('featured-post-inner');
?>
style="background-image:url(<?php
echo tie_thumb_src('slider');
?>
);">
<span class="fa overlay-icon"></span>
<div class="featured-cover"><a href="<?php
the_permalink();
?>
"></a></div>
<div class="featured-title">
<h2><a href="<?php
the_permalink();
?>
"><?php
开发者ID:NguyenHiep,项目名称:learn-wp,代码行数:31,代码来源:template-media.php
示例13: get_the_category
}
else{
$categories = get_the_category($post->ID);
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
$args=array('post__not_in' => array($post->ID),'posts_per_page'=> $related_no , 'category__in'=> $category_ids, 'no_found_rows' => 1 );
}
$related_query = new wp_query( $args );
if( $related_query->have_posts() ) : $count=0;?>
<section id="related_posts">
<div class="block-head">
<h3><?php _eti( 'Related Articles' , 'tie' ); ?></h3><div class="stripe-line"></div>
</div>
<div class="post-listing">
<?php while ( $related_query->have_posts() ) : $related_query->the_post(); $do_not_duplicate[] = get_the_ID(); ?>
<div <?php tie_post_class('related-item'); ?>>
<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'tie-medium' ); ?>
<span class="fa overlay-icon"></span>
</a>
</div><!-- post-thumbnail /-->
<?php endif; ?>
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<p class="post-meta"><?php tie_get_time() ?></p>
</div>
<?php endwhile;?>
<div class="clear"></div>
</div>
</section>
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:31,代码来源:related-posts.php
示例14: unserialize
<ul class="best-reviews">
<?php
$tie_blog_cats = unserialize($get_meta["tie_blog_cats"][0]);
if (empty($tie_blog_cats)) {
$tie_blog_cats = tie_get_all_category_ids();
}
$num_posts = $get_meta["tie_posts_num"][0];
$counter = 0;
$original_post = $post;
$cat_query = new WP_Query(array('category__in' => $tie_blog_cats, 'posts_per_page' => $num_posts, 'orderby' => 'meta_value_num', 'meta_key' => 'taq_review_score', 'post_status' => 'publish', 'no_found_rows' => 1));
while ($cat_query->have_posts()) {
$cat_query->the_post();
$counter++;
?>
<li <?php
tie_post_class('');
?>
>
<div class="best-review-score-image">
<span class="best-review-score" ><?php
echo $counter;
?>
</span>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
开发者ID:NguyenHiep,项目名称:learn-wp,代码行数:31,代码来源:template-best-reviews.php
示例15: tie_get_option
<h3><?php
if (tie_get_option('related_title')) {
echo tie_get_option('related_title');
} else {
_e('Related Articles', 'tie');
}
?>
</h3><div class="stripe-line"></div>
</div>
<div class="post-listing">
<?php
while ($related_query->have_posts()) {
$related_query->the_post();
?>
<div <?php
tie_post_class('related-item');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" title="<?php
printf(__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
<?php
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:post-related.php
示例16: _eti
">
<a href="#" id="check-also-close"><i class="fa fa-close"></i></a>
<div class="block-head">
<h3><?php
_eti('Check Also');
?>
</h3>
</div>
<?php
while ($check_also_query->have_posts()) {
$check_also_query->the_post();
?>
<div <?php
tie_post_class('check-also-post');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
">
<?php
the_post_thumbnail('tie-medium');
?>
<span class="fa overlay-icon"></span>
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:check-also.php
示例17: get_home_recent
function get_home_recent($cat_data)
{
$exclude = $Posts = $Box_Title = $pagination = $offset = '';
if (!empty($cat_data['exclude'])) {
$exclude = $cat_data['exclude'];
}
if (!empty($cat_data['number'])) {
$Posts = $cat_data['number'];
}
if (!empty($cat_data['title'])) {
$Box_Title = $cat_data['title'];
}
if (!empty($cat_data['display'])) {
$display = $cat_data['display'];
}
if (!empty($cat_data['pagi'])) {
$pagination = $cat_data['pagi'];
}
if (!empty($cat_data['offset'])) {
$offset = $cat_data['offset'];
}
$args = array('posts_per_page' => $Posts, 'category__not_in' => $exclude, 'offset' => $offset, 'ignore_sticky_posts' => 1);
if (!empty($pagination) && $pagination == 'y') {
$args['paged'] = get_query_var('paged');
} else {
$args['no_found_rows'] = 1;
}
$cat_query = new WP_Query($args);
?>
<section class="cat-box recent-box">
<div class="cat-box-title">
<h2><?php
if (function_exists('icl_t')) {
echo icl_t(theme_name, $cat_data['boxid'], $Box_Title);
} else {
echo $Box_Title;
}
?>
</h2>
<div class="stripe-line"></div>
</div><!-- post-thumbnail /-->
<div class="cat-box-content">
<?php
if ($cat_query->have_posts()) {
?>
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
?>
<?php
if ($display == 'blog') {
?>
<article <?php
tie_post_class('item-list');
?>
>
<h2 class="post-box-title"><a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php
the_title();
?>
</a></h2>
<?php
get_template_part('includes/boxes-meta');
?>
<?php
if (tie_get_option('blog_display') == 'content') {
?>
<div class="entry">
<?php
the_content(__('Read More »', 'tie'));
?>
</div>
<?php
} else {
?>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
<?php
the_post_thumbnail('thumbnail');
//.........这里部分代码省略.........
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:101,代码来源:home-recent-box.php
示例18: get_home_scroll
function get_home_scroll($cat_data)
{
?>
<?php
wp_enqueue_script('tie-cycle');
$Cat_ID = $cat_data['id'];
$offset = $Box_Title = $Posts = '';
if (!empty($cat_data['number'])) {
$Posts = $cat_data['number'];
}
if (!empty($cat_data['title'])) {
$Box_Title = $cat_data['title'];
}
if (!empty($cat_data['offset'])) {
$offset = $cat_data['offset'];
}
$cat_query = new WP_Query('cat=' . $Cat_ID . '&no_found_rows=1&posts_per_page=' . $Posts . '&offset=' . $offset);
?>
<section class="cat-box scroll-box">
<div class="cat-box-title">
<h2><a href="<?php
echo get_category_link($Cat_ID);
?>
"><?php
if (function_exists('icl_t')) {
echo icl_t(theme_name, $cat_data['boxid'], $Box_Title);
} else {
echo $Box_Title;
}
?>
</a></h2>
<div class="stripe-line"></div>
</div><!-- post-thumbnail /-->
<div class="cat-box-content">
<?php
if ($cat_query->have_posts()) {
?>
<div id="slideshow<?php
echo $Cat_ID;
?>
" class="group_items-box">
<?php
while ($cat_query->have_posts()) {
$cat_query->the_post();
?>
<div <?php
tie_post_class('scroll-item');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
<?php
tie_thumb('tie-medium');
?>
<span class="overlay-icon"></span>
</a>
</div><!-- post-thumbnail /-->
<?php
}
?>
<h3 class="post-box-title"><a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php
the_title();
?>
</a></h3>
<p class="post-meta">
<?php
if (tie_get_option('box_meta_score')) {
tie_get_score();
}
?>
<?php
if (tie_get_option('box_meta_date')) {
tie_get_time();
}
?>
</p>
</div>
<?php
}
?>
<div class="clear"></div>
</div>
//.........这里部分代码省略.........
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:101,代码来源:home-cat-scroll.php
示例19: the_permalink
?>
</p>
<a class="more-link" href="<?php
the_permalink();
?>
"><?php
_eti('Read More »');
?>
</a>
</div>
</li><!-- .first-news -->
<?php
} else {
?>
<li <?php
tie_post_class('other-news');
?>
>
<?php
if (function_exists("has_post_thumbnail") && has_post_thumbnail() && empty($block['thumb_small'])) {
?>
<div class="post-thumbnail">
<a href="<?php
the_permalink();
?>
" rel="bookmark"><?php
the_post_thumbnail('tie-small');
?>
<span class="fa overlay-icon"></span></a>
</div><!-- post-thumbnail /-->
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:block-categories.php
示例20: array
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
$args=array('post__not_in' => $do_not_duplicate ,'posts_per_page'=> $check_also_no , 'category__in'=> $category_ids, 'no_found_rows' => 1 );
}
$check_also_query = new wp_query( $args );
if( $check_also_query->have_posts() ) :?>
<section id="check-also-box" class="post-listing check-also-<?php echo $check_also_position?>">
<a href="#" id="check-also-close"><i class="fa fa-close"></i></a>
<div class="block-head">
<h3><?php _eti( 'Check Also' ); ?></h3>
</div>
<?php while ( $check_also_query->have_posts() ) : $check_also_query->the_post()?>
<div <?php tie_post_class( 'check-also-post' ); ?>>
<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'tie-medium' ); ?>
<span class="fa overlay-icon"></span>
</a>
</div><!-- post-thumbnail /-->
<?php endif; ?>
<h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p><?php tie_excerpt_home() ?></p>
</div>
<?php endwhile;?>
</section>
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:29,代码来源:check-also.php
注:本文中的tie_post_class函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论