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


PHP wp_related_posts函數代碼示例

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


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

示例1: get_template_part

				<?php 
    get_template_part('content', 'single');
    ?>
				<p style="text-align:justify; color:#999; font-weight:bold;">
					Disclaimer: All the opinions expressed in this article are those
					of the individual authors only. The Fifth Estate does not endorse 
					any of the views mentioned in the article. The views are not to be 
					construed in any manner as the official views of IIT Madras.
				</p>
				<p style="text-align:justify; color:#999; font-weight:bold;">
					Content copyright: The Fifth Estate, IIT-M's Student Media Body.
					For permissions to reuse part or whole of the content, 
					email us at <a href="mailto:t5e.iitm@gmail.com">t5e.iitm@gmail.com</a>					
				</p>
				<?php 
    wp_related_posts();
    ?>
				<?php 
    zerif_post_nav();
    ?>
			 
				<?php 
    // If comments are open or we have at least one comment, load up the comment template
    if (comments_open() || '0' != get_comments_number()) {
        comments_template('');
    }
}
// end of the loop.
?>
		</main><!-- #main -->
	</div><!-- #primary -->
開發者ID:abhiShandy,項目名稱:t5e,代碼行數:31,代碼來源:single-op-eds.php

示例2: hybrid_related_posts

/**
* Shows related posts by plugin
* Only show if plugin is active
*
* @since 0.2.2
*
* @plugin - http://wasabi.pbwiki.com/Related%20Entries
* @plugin - http://rmarsh.com/plugins/similar-posts
* @plugin - http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin
***********************************************************/
function hybrid_related_posts()
{
    if (function_exists('related_posts') || function_exists('similar_posts') || function_exists('wp_related_posts')) {
        echo '<div class="related-posts">';
        echo '<h3>' . __('Related Posts', 'options') . '</h3>';
        if (function_exists('related_posts')) {
            echo '<ul class="related">';
            related_posts();
            echo '</ul>';
        } elseif (function_exists('similar_posts')) {
            similar_posts();
        } elseif (function_exists('wp_related_posts')) {
            wp_related_posts();
        }
        echo '</div>';
    }
}
開發者ID:alicam,項目名稱:vanilla-theme,代碼行數:27,代碼來源:template-functions.php

示例3: wp23_related_posts

function wp23_related_posts() {
	wp_related_posts();
}
開發者ID:ramo01,項目名稱:1kapp,代碼行數:3,代碼來源:utils.php

示例4: wp_related_posts

 ?>
         </div>
         <!-- /post -->
         <!-- google_ad_section_end -->
         
         <!-- post-meta -->
         <div class="post-meta">
             
             <?php 
 if (get_option('wicketpixie_plugin_related-posts') == 'true' && function_exists(wp_related_posts)) {
     ?>
             <!-- related-posts -->
             <div id="related-posts">
                 <h3>You might also be interested in...</h3>
                  <?php 
     wp_related_posts(5);
     ?>
             </div>
             <!-- /related-posts -->
             <?php 
 }
 ?>
             
             <!-- post-meta-right -->
             <div class="post-meta-right">
                 
                 
                 <!-- post-meta-tags -->
                 <div class="post-meta-tags">
                     <h6>Tags</h6>
                     <?php 
開發者ID:EddieRingle,項目名稱:wicketpixie,代碼行數:31,代碼來源:home.php


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