Advertisement
Guest User

Untitled

a guest
Nov 12th, 2013
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.     $post_id = get_the_ID();
  3.     if(function_exists('yarpp_related'))
  4.         yarpp_related(
  5.         array(
  6.             'post_type' => array('download'),
  7.             'past_only' => false,
  8.             'weight' => array(
  9.                 'body' => 1,
  10.                 'title' => 2, // larger weights mean this criteria will be weighted more heavily
  11.                 'tax' => array(
  12.                     'download_tag' => 1,
  13.                     // put any taxonomies you want to consider here with their weights
  14.                     'download_category' => 1,
  15.                 )
  16.             ),
  17.             'limit' => 5,
  18.             /*'require_tax' => array(
  19.                 'download_tag' => 1 // for example, this requires all results to have at least one 'post_tag' in common.
  20.             ),*/
  21.             // The threshold which must be met by the "match score"
  22.             //'threshold' => 2,
  23.             'order' => 'score DESC'
  24.             )
  25.         );
  26.             // 'template' 'limit' 'order'
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement