本文整理汇总了PHP中related_posts函数的典型用法代码示例。如果您正苦于以下问题:PHP related_posts函数的具体用法?PHP related_posts怎么用?PHP related_posts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了related_posts函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: related_posts_sidebar_module
function related_posts_sidebar_module($args)
{
extract($args);
if (is_single() and !defined('K2_NOT_FOUND')) {
echo $before_module . $before_title . $title . $after_title;
?>
<ul>
<?php
related_posts();
?>
</ul>
<?php
echo $after_module;
}
}
示例2: wp_link_pages
<div class="ps-pagination">
<?php
wp_link_pages(array('before' => '<ul class="pagination ps-pages"><a>Pages</a>', 'after' => '</ul>', 'link_before' => '<span>', 'link_after' => '</span>'));
?>
</div>
<?php
if (function_exists('related_posts') || ot_get_option('pst_content_below') != '') {
?>
<div id="belowpst-stuff" class="well well-default well-sm">
<div class="relatedpst col-md-6">
<?php
if (function_exists('related_posts')) {
related_posts();
}
?>
</div>
<?php
if (ot_get_option('pst_content_below') != '') {
?>
<div class="pst-ad-below col-md-6"><?php
echo ot_get_option('pst_content_below');
?>
</div>
<?php
}
?>
<div class="fix"></div>
示例3: the_modified_date
the_modified_date();
?>
</span>
</div>
<div class="dataBlock">
<h2>Tags</h2>
<div id="tagList">
<?php
the_tags(__('', 'html5blank'), '', '<br>');
?>
</div>
</div><div class="dataBlock">
<?php
related_posts($post);
?>
</div>
<?php
list_references("ref");
?>
</div><!-- /post -->
示例4: relatedposts
function relatedposts()
{
/* echo '<div id = "relatedposts" style = "background: #f9f9f9; padding: 24px;">'; */
related_posts();
/*echo '</div>'; */
}
示例5: author_box
if (rd_options('reedwan_post_author') == 1) {
?>
<div class="box-author mts clearfix">
<?php
echo author_box(get_the_author_meta('ID'), true);
?>
</div>
<?php
}
?>
<?php
if (rd_options('reedwan_post_similar') == 1) {
?>
<?php
echo related_posts(rd_options('reedwan_post_similar_number'), rd_options('reedwan_post_similar_by'), get_the_ID());
?>
<?php
}
?>
<?php
if ($post_comment != 'comment_none') {
?>
<div class="single-comments mts clearfix">
<?php
if ($post_comment == 'comment_disqus') {
?>
<?php
echo disqus_embed($disqus_shortname);
?>
<?php
示例6: array
<!--<div class="block-top-b wrapper <?php
if ($this['config']->get('block-top-b')) {
echo 'max-width' . $this['config']->get('block-top-b');
}
?>
"> -->
<!--<section id="top-b"><?php
echo $this['modules']->render('top-b', array('layout' => $this['config']->get('top-b')));
?>
</section>-->
<?php
echo $this->render('social_icons');
?>
<div style="clear:both"></div><hr/>
<?php
related_posts('main');
?>
<!--</div> -->
</div>
<?php
}
?>
</div>
示例7: 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>';
}
}
示例8: the_author_meta
}
?>
</div>
<div class="hentry-author-about"><?php
the_author_meta('description');
?>
</div>
</div>
<?php
}
?>
<?php
if (get_option('unspoken_rel_type2')) {
if (function_exists('related_posts')) {
related_posts(array('template_file' => 'yarpp-template-similar.php'));
}
}
?>
<?php
if (get_option('unspoken_share_type1')) {
?>
<div class="hentry-widget hentry-share">
<h6><?php
_e('Share this article', 'unspoken');
?>
</h6>
<ul>
<li class="twitter"><a href="http://twitter.com/share?text=<?php
示例9: blog_posts
<?php
include 'header.php';
$blog_posts = blog_posts();
$related = related_posts();
?>
<?php
############################################
$deps = depoimentos();
$depsdados = $deps['array'];
$depscount = $deps['contador'];
############################################
?>
<div id="aparelhos">
<div id="aparelhos-titulo-pagina">
<p class="Oswald fs-38 azul fw700">blog</p>
</div>
<div class="aparelhos-content">
<?php
foreach ($blog_posts as $posts) {
?>
<article>
<h2 class="Oswald fs-24 fw400 azul mt0"><?php
echo $posts['titulo'];
?>
</h2>
<!-- h3 class="Cycle fs-16 fw400"><?php
echo BDtoBR($posts['datacad']);
?>
示例10: azexo_post_nav
if (isset($options['post_navigation']) && $options['post_navigation'] == 'before') {
azexo_post_nav();
}
?>
<?php
get_template_part('content', get_post_format());
?>
<?php
if (isset($options['post_navigation']) && $options['post_navigation'] == 'after') {
azexo_post_nav();
}
?>
<?php
if (function_exists('related_posts')) {
related_posts(array('template' => 'yarpp-template-default.php'));
}
?>
<?php
if (comments_open()) {
comments_template();
}
?>
<?php
}
?>
</div><!-- #content -->
</div><!-- #primary -->
示例11: or_related_posts_fn
function or_related_posts_fn()
{
if (function_exists('related_posts')) {
echo "<h3>" . __('Related Posts:') . "</h3>\n";
echo "<ul>\n";
related_posts();
echo "</ul>\n";
}
}
示例12: widget
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
if (!empty($title)) {
echo $before_title . $title . $after_title;
}
if (!function_exists('related_posts') || !related_posts()) {
}
echo $after_widget;
}
示例13: wp_reset_query
<?php
if (!is_single()) {
?>
<section class="related">
<?php
wp_reset_query();
$args = array('posts_per_page' => 1, 'orderby' => 'comment_count', 'order' => 'DESC', 'ignore_sticky_posts' => 1);
$popular_posts = new WP_Query($args);
remove_filter('posts_where', 'filter_where');
if ($popular_posts->have_posts()) {
while ($popular_posts->have_posts()) {
$popular_posts->the_post();
?>
<div class="clearfix"></div>
<?php
related_posts(array('template_file' => 'yarpp-template-t5-simple.php'), true, get_the_ID());
?>
<?php
}
}
?>
</section>
</div>
<div class="clearfix"></div>
<?php
}
?>
</section>
<?php