- Changed the way search results are paginated. This makes adjusting the number of search results shown much easier.
I’ve posted a knowledge base post that describes how the posts_per_page value is adjusted with Relevanssi 1.4.4.
I’ve posted a knowledge base post that describes how the posts_per_page value is adjusted with Relevanssi 1.4.4.
Not logged in. Log in to see your license details.
…one week and halve the weight of posts older than that. add_filter( ‘relevanssi_match’, ‘date_weights’ ); function date_weights( $match ) { $post_date = get_the_time( ‘U’, $match->doc ); if ( time() – $post_date < WEEK_IN_SECONDS ) { $match->weight = $match->weight * 2; } else { $match->weight = $match->weight / 2; } return……$title_boost + $match->content + $match->comment * $comment_boost + $match->tag * $tag_boost + $match->link * $link_boost + $match->author + $match->category + $match->excerpt + $match->taxonomy + $match->customfield; $match->weight = $match->tf * $idf; Where $idf is the inverse document frequency, aka the rarity of the term in question. The bigger the weight, the……} return $match; } Weight from tags Relevanssi Premium has a simple weight setting for adding weight to tags. If you want that in free Relevanssi, you have to use relevanssi_match to add extra weight to tags. add_filter( ‘relevanssi_match’, ‘rlv_boost_tags’ ); function rlv_boost_tags( $match ) { if ( $match->tag >…