本文整理汇总了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