function widget($args, $instance)
 {
     global $post;
     if (!is_singular()) {
         return;
     }
     extract($args);
     $instance['post_type'] = $post->post_type == 'page' ? array('page') : array('post');
     if (yarpp_get_option('cross_relate')) {
         $instance['post_type'] = array('post', 'page');
     }
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if (!$instance['use_template']) {
         echo $before_title;
         if ($title) {
             echo $title;
         } else {
             _e('Related Posts (YARPP)', 'yarpp');
         }
         echo $after_title;
     }
     $instance['domain'] = 'widget';
     echo yarpp_related(null, $instance, false);
     echo $after_widget;
 }
Example #2
0
function yarpp_ajax_display_demo_rss()
{
    header("HTTP/1.1 200");
    header("Content-Type: text/html; charset=UTF-8");
    $return = yarpp_related(array('post'), array(), false, false, 'demo_rss');
    echo ereg_replace("[\n\r]", '', nl2br(htmlspecialchars($return)));
    exit;
}
function related_entries($args = array(), $reference_ID = false, $echo = true)
{
    global $hw_yarpp;
    if (false !== $reference_ID && is_bool($reference_ID)) {
        _doing_it_wrong(__FUNCTION__, "This YARPP function now takes \$args first and \$reference_ID second.", '3.5');
        return;
    }
    $args['post_type'] = $hw_yarpp->get_post_types();
    return yarpp_related($args, $reference_ID, $echo);
}
Example #4
0
function yarpp_ajax_display_demo_rss()
{
    global $wpdb, $post, $userdata, $yarpp_demo_time, $wp_query, $id, $page, $pages, $yarpp_limit;
    header("Content-Type: text/html; charset=utf-8");
    $yarpp_limit = yarpp_get_option('rss_limit');
    $return = yarpp_related(array('post'), array(), false, false, 'demo_rss');
    unset($yarpp_limit);
    echo ereg_replace("[\n\r]", '', nl2br(htmlspecialchars($return)));
    exit;
}
Example #5
0
 /**
  * Manages the display of related posts
  */
 function franz_related_posts()
 {
     if (!function_exists('yarpp_related')) {
         return;
     }
     $display_settings = get_option('yarpp');
     $display_settings = $display_settings['auto_display_post_types'];
     if (!is_singular() || !in_array(get_post_type(), $display_settings)) {
         return;
     }
     $args = array('template' => 'yarpp-template-single.php', 'limit' => 3);
     yarpp_related(apply_filters('franz_yarpp_args', $args));
 }
Example #6
0
?>
</p>
        </div>
    </header>
    <div class="entry__content">
      <?php 
the_content();
?>




      <footer class="related__entries">

      <?php 
yarpp_related(array('post_type' => array('post', 'page'), 'show_pass_post' => false, 'past_only' => false, 'exclude' => array(), 'recent' => false, 'weight' => array('body' => 2, 'title' => 2, 'tax' => array('category' => 1, 'post_tag' => 3)), 'threshold' => 5, 'template' => 'yarpp-template-entries.php', 'limit' => 3, 'order' => 'score DESC'), get_the_ID(), true);
?>
      </footer>

    </div>
    <aside class="sidebar" role="complementary">
      <div class="sidebar--inner">
        <?php 
$parent_id = wp_get_post_parent_id($post_ID);
switch ($parent_id) {
    case 54:
        $submenu = 'alvaszavar_navigation';
        break;
    case 56:
        $submenu = 'gyogyitas_navigation';
        break;
Example #7
0
<br />

<?php 
    the_tags();
    ?>
</div>

<?php 
}
?>




<?php 
the_content();
?>


<?php 
if (is_single() || is_page()) {
    printLikes(get_the_ID());
}
?>


<?php 
if (is_single()) {
    yarpp_related();
}
?>
function related_entries($a = array(), $echo = true)
{
    return yarpp_related(array('page', 'post'), $a, $echo);
}
 function widget($args, $instance)
 {
     if (!is_single()) {
         return;
     }
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     echo $before_title;
     if ($title) {
         echo $title;
     } else {
         _e('Related Posts (YARPP)', 'yarpp');
     }
     echo $after_title;
     echo yarpp_related(array('post'), $instance, false, false, 'widget');
     echo $after_widget;
 }
function related_entries($args = array(), $echo = true, $reference_ID = false)
{
    $args['post_type'] = array('post', 'page');
    return yarpp_related($reference_ID, $args, $echo);
}
function yarpp_rss_excerpt($content)
{
    global $wpdb, $post;
    if (yarpp_get_option('rss_excerpt_display') and yarpp_get_option('rss_display')) {
        return $content . clean_pre(yarpp_related(array('post'), array(), false, 'rss'));
    } else {
        return $content;
    }
}
Example #12
0
function related_entries($a = array(), $echo = true, $reference_ID = false)
{
    return yarpp_related(array('page', 'post'), $a, $echo, $reference_ID);
}