本文整理匯總了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 -->
示例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>';
}
}
示例3: wp23_related_posts
function wp23_related_posts() {
wp_related_posts();
}
示例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