sultanbekov
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Contextual Related Posts] Ignore post title in the matching algorithmthanks for showing me how to use the filter. That is working for me! One thing to note for anyone else who may be doing this: when I added the above filter, I kept getting a DB error:
Can't find FULLTEXT index matching the column listMy query looked like this:
SELECT wp_posts.*, MATCH (wp_posts.post_content) AGAINST ('Can Dogs Eat Stri…') as score FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( wp_posts.post_date <= '2023-02-17 02:32:43' ) AND wp_posts.ID NOT IN (642) AND ( ( wp_postmeta.meta_key = 'cdet_safety_classification' AND wp_postmeta.meta_value = 'safe' ) ) AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'inherit')) AND MATCH (wp_posts.post_content) AGAINST ('Can Dogs Eat Stri…') GROUP BY wp_posts.ID ORDER BY score DESC LIMIT 0, 6With some trial and error, I ended up running this sql and it fixed the error:
ALTER TABLE wp_posts ADD FULLTEXT crp_related_content(post_content);The matching is working better for me now that I only match for the post_content. Thx again!
Forum: Plugins
In reply to: [Contextual Related Posts] Ignore post title in the matching algorithmThanks for the quick response! Can you please give a code example of how I might override the match_fields from the theme level?
Viewing 2 replies - 1 through 2 (of 2 total)