WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
CPT Taxonomy & YARPP (2 posts)

  1. popsantiago
    Member
    Posted 1 year ago #

    Hi,

    I put this code on my template :

    <?php yarpp_related(array(
                     'post_type' => array('visite','post'),
    				 'weight' => array(
    			        'body' => 1,
    			        'title' => 2, // larger weights mean this criteria will be weighted more heavily
    			    ),
    			    // Specify taxonomies and a number here to require that a certain number be shared:
        			'require_tax' => array(
    			        'regions' => 1 // for example, this requires all results to have at least one 'post_tag' in common.
       				 ),
                    )); ?>

    So if i understood, Related get the
    CPT Visite with the Region_tag in common ?

    But nothing appear (I did my tests with 2 posts in the sames Custom_Tax...)
    If i don't put

    // Specify taxonomies and a number here to require that a certain number be shared:
        			'require_tax' => array(
    			        'regions' => 1 // for example, this requires all results to have at least one 'post_tag' in common.
       				 ),

    I got a result with the title because for the test i put one same word in the title...

    Any idea ?

    Thanks

    Sorry for my bad english (french guy...)

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    You might want to try setting a lower "match threshold". You can do that in your custom code by setting 'threshold' => 1, for example.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.