Minor bug with title matching
-
Ajay,
This is a great plugin, but there’s a minor bug if I select a match on title only.
In contextual-related-posts.php, this:
if( $match_content ) { $stuff = $post->post_title. ' ' . crp_excerpt( $post->ID, $match_content_words, false ); } else { $stuff = $post->post_title; }
should be this:
if( $match_content ) { $stuff = $post->post_title. ' ' . crp_excerpt( $post->ID, $match_content_words, false ); $fields = "post_title,post_content"; } else { $stuff = $post->post_title; $fields = "post_title"; }
and this:
WHERE MATCH (post_title,post_content) AGAINST ('%s')
should be this:
WHERE MATCH (".$fields.") AGAINST ('%s')
Again, well done, for a great plugin!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Minor bug with title matching’ is closed to new replies.