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


PHP post_views函數代碼示例

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


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

示例1: youpzt_thumbnail

		   <a href="<?php 
        echo $post_link;
        ?>
" class="zoom" rel="bookmark" title="<?php 
        echo $post_title;
        ?>
"><?php 
        echo youpzt_thumbnail(250, 260);
        ?>
 </a>
		  <div class="caption">    
			<p class="f12 pro-meta"><span>關注度:<?php 
        if (function_exists('the_views')) {
            the_views();
        } else {
            post_views();
        }
        ?>
</span><span class="fr pro-time f12"><em class="glyphicon fui-time"></em> <?php 
        echo get_the_time('Y-m-d');
        ?>
</span></p>
			<!--<div class="color-6"><?php 
        the_tags('<span class="pro-tags">標簽:', '/', '</span>');
        ?>
</div>-->
		  </div>
		</div>
	</div>

     <?php 
開發者ID:fengdou902,項目名稱:testgit,代碼行數:31,代碼來源:reader.php

示例2: get_the_author

"><?php 
        echo get_the_author();
        ?>
</a>&#124;</span>
 				<span class="metapl">
				 <?php 
        comments_popup_link('暫無評論 &#187;', '1 條評論 &#187;', '% 條評論 &#187;');
        ?>
</span>
				<span class="metabj">
				  <?php 
        edit_post_link('編輯', ' &#124; ', '');
        ?>
				</span>	
				閱讀:<?php 
        post_views(' ', ' 次');
        ?>
			
				</p>
		</div>
	</div>

    <?php 
    }
    ?>

    <div class="navigation">
    	<?php 
    posts_nav_link('', '', '');
    ?>
    </div>
開發者ID:Lichmao,項目名稱:mytheme,代碼行數:31,代碼來源:index.php

示例3: while

    while (have_posts()) {
        the_post();
        ?>
            <article class="post-page post" id="post-<?php 
        the_ID();
        ?>
">
                <header class="page-title">
                    <h2><?php 
        the_title();
        ?>
</h2>
                    <address class="page-edit">
                        <span class  ="entry-views"><?php 
        if (function_exists('post_views')) {
            post_views('瀏覽:', '次');
        }
        ?>
</span>
                        <span ><?php 
        edit_post_link(__('[編輯]', 'zws'), '<p>', '</p>');
        ?>
</span>
                    </address>
                </header>
                <div class="entry">
                    <?php 
        the_content();
        ?>
                </div>
            </article>
開發者ID:nooldey,項目名稱:WordPress-theme-BooDing,代碼行數:31,代碼來源:page.php

示例4: the_ID

?>
<div id="wrapper">
    <div id="content">
        <article class="post post-page"  id="post-<?php 
the_ID();
?>
">
            <header class="page-title">
                <h2><?php 
the_title();
?>
</h2>
                <address class="page-edit">
                    <span class  ="entry-views"><?php 
if (function_exists('post_views')) {
    post_views('瀏覽', '次');
}
?>
</span>
                    <span ><?php 
edit_post_link(__('[編輯]', 'zws'), '<p>', '</p>');
?>
</span>
                </address>
            </header>
            <div class="entry">
                <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
開發者ID:nooldey,項目名稱:WordPress-theme-BooDing,代碼行數:31,代碼來源:UrlRend.php

示例5: comments_popup_link

                <span class="comments-link"><?php 
    comments_popup_link('0', '1', '%');
    ?>
</span>
            <?php 
}
?>
            <address class="entry-meta">
                <p>
                    <span class="entry-author"><?php 
the_author_posts_link('');
?>
</span>  
                    <span class  ="entry-views"><?php 
if (function_exists('post_views')) {
    post_views('', ' views');
}
?>
</span>
                    <span class="entry-edit"><?php 
edit_post_link('編輯', '[', ']');
?>
</span>
                </p>
            </address>
            <?php 
if (is_home() || is_archive() || is_search()) {
    ?>
            <div class="entry">
                <?php 
    include 'thumbnail.php';
開發者ID:nooldey,項目名稱:WordPress-theme-BooDing,代碼行數:31,代碼來源:post-standard.php

示例6: comments_open

										'link_before' => '<span>',
										'link_after'  => '</span>',
									) ); ?>
									
								<?php   comments_open() ?>
								</p>
							</div>
							<footer class="post-meta-single">
								<div class="meta-l">
									 <?php the_tags( '<span class="post-tag">', '', '</span>'); ?>
									 <span class="post-auther"><?php the_author_posts_link(); ?></span>
									 <span class="post-category"><?php the_category('/') ?></span>
									 <?php edit_post_link('編輯', '<span class="post-auther">', '</span>'); ?>
								 </div>
								 <div class="meta-r">
									 <span class="post"><?php post_views(' ','次點擊'); ?> </span>
									 <span class="comments-num" date-cunt="<?php echo zfunc_comments_users($post->ID); ?>"><?php comments_popup_link('0人發表看法', '1人發表看法', '%人發表看法'); ?></span>
								</div>
								<div class="clearfix"></div>
							</footer>
						</div>
					</article>
					<?php
				endwhile;
				// Previous/next post navigation.
				 ?>
		    	<?php 
			else :
				// If no content, include the "No posts found" template.
				get_template_part( 'content', 'none' );
開發者ID:alongbao,項目名稱:M-V2EX,代碼行數:30,代碼來源:single.php

示例7: the_author

        the_author();
        ?>
 於 <?php 
        the_time('m');
        ?>
-<?php 
        the_time('d');
        ?>
 發布在 <?php 
        the_category(', ');
        ?>
 分類下 <?php 
        printf(_e('超過', 'Gztro'));
        ?>
 <?php 
        post_views(' ');
        ?>
 次圍觀 <?php 
        comments_popup_link('暫無評論', '1條評論', '%條評論');
        ?>
 &nbsp; <?php 
        edit_post_link('編輯本文', '', '');
        ?>
</span>
</div>	
<?php 
    }
}
?>
<div class="pagenavi"><?php 
pagenavi();
開發者ID:surmon-china,項目名稱:Wordpress_Theme_Think,代碼行數:31,代碼來源:index.php

示例8: comments_popup_link

?>
</h1>
			<?php 
if (comments_open()) {
    ?>
				<div class="comments-link" style="margin: 10px 0px;">
					<i class="fa fa-comments"></i><?php 
    comments_popup_link('<span class="leave-reply">' . __('暫無評論', 'hmjblog') . '</span>', __('1條評論', 'hmjblog'), __('%條評論', 'hmjblog'));
    ?>
 <i class="fa fa-eye"></i><?php 
    post_views('', '次瀏覽');
    ?>
				</div>
			<?php 
}
?>
			<?php 
if (!comments_open()) {
    ?>
				<div class="comments-link" style="margin: 10px 0px;">
					<i class="fa fa-comments"></i><span class="leave-reply">評論關閉</span> <i class="fa fa-eye"></i><?php 
    post_views('', '次瀏覽');
    ?>
				</div>
			<?php 
}
?>
		</header>
		<div class="entry-content">
			<?php 
the_content();
開發者ID:ericzuobin,項目名稱:sahinn-blog,代碼行數:31,代碼來源:template-page.php

示例9: the_author

							<span class="group">
								<i class="iconfont iconfont-exceprt">&#xe605</i>
								<?php 
        the_author();
        ?>
							</span>
							<span class="group">
								<i class="iconfont iconfont-exceprt">&#xe608</i>
								<?php 
        the_time('Y-m-d');
        ?>
							</span>
							<span class="group">
								<i class="iconfont iconfont-exceprt">&#xe607</i>
								<?php 
        echo post_views();
        ?>
瀏覽
							</span>
							<span class="group">
								<i class="iconfont iconfont-exceprt">&#xe606</i>
								<?php 
        comments_popup_link('0 條評論', '1 條評論', '% 條評論', '', '評論已關閉');
        ?>
							</span>
					</div>
					<div class="note">
						<?php 
        the_excerpt();
        ?>
					</div>
開發者ID:pemiu01,項目名稱:WordPress_Theme_2m,代碼行數:31,代碼來源:archive.php

示例10: the_author

        the_author();
        ?>
</span>
				<span class="date"><?php 
        _e('時間:', 'html5blank');
        the_time('Y-m-d');
        ?>
</span>
				<span class="category"><?php 
        _e('分類: ', 'html5blank');
        the_category(', ');
        // Separated by commas
        ?>
</span>
				<span class="views"><?php 
        post_views('閱讀:', '');
        ?>
</span>
			</div>
			<!-- post details -->
			<div class="entry-article">
				<?php 
        the_content();
        // Dynamic Content
        ?>
			

				<?php 
        the_tags(__('標簽: ', 'html5blank'), ', ', '<br>');
        // Separated by commas with a line break at the end
        ?>
開發者ID:Fengtalk,項目名稱:Bytecats,代碼行數:31,代碼來源:single.php

示例11: the_author_posts_link

								</p>
							</div>
							<footer class="post-meta-single">
								<div class="meta-l">
									 <span class="post-auther"><?php 
        the_author_posts_link();
        ?>
</span>
									 <span class="post-category"><?php 
        the_category('/');
        ?>
</span>
								 </div>
								 <div class="meta-r">
									 <span class="post"><?php 
        post_views(' ', '次點擊');
        ?>
 </span>
									 <span class="comments-num"><?php 
        comments_popup_link('0人發表看法', '1人發表看法', '%人發表看法');
        ?>
</span>
								</div>
								<div class="clearfix"></div>
							</footer>
						</div>
					</article>
					<?php 
    }
    // Previous/next post navigation.
    ?>
開發者ID:alongbao,項目名稱:M-V2EX,代碼行數:31,代碼來源:page.php

示例12: array

<ul>
        <?php 
$args = array('posts_per_page' => 8, 'meta_key' => 'views', 'orderby' => 'meta_value_num', 'date_query' => array(array('after' => '2 month ago')));
$postslist = get_posts($args);
foreach ($postslist as $post) {
    setup_postdata($post);
    ?>
            <li><i class="righticon"></i>
                <a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo mb_strimwidth(get_the_title(), 0, 50, '...');
    ?>
"><?php 
    echo mb_strimwidth(get_the_title(), 0, 26, '...');
    ?>
</a>
                <span class="grey-span"> - <?php 
    if (function_exists('post_views')) {
        post_views($post->ID);
    }
    //如果安裝的是插件就換成插件的調用方法
    ?>
</span>
            </li>
        <?php 
}
wp_reset_postdata();
?>
</ul>
開發者ID:nooldey,項目名稱:WordPress-theme-BooDing,代碼行數:31,代碼來源:topviews.php


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