php - Override Buddypress function to change SQL conditions -
i’d add condtions bp_forum_topics() loop contain posts keywords. can me this?
i’d create custom plugin overrides current function bp_forum_topics() this. im new wordpress development unsure filters , tags. right returns topics (with exception of loose search terms, newest, popular etc). want able return topics if posts related topics contains specific search terms.
i can manage coding this, i'm unsure overriding bp_forums_get_post functions while still retaining other functions used in buddypress, such get_avatar.
any great.
mark
update: here sql
select post.post_id, post.topic_id, topic.topic_title, post.post_text bb_posts post left join bb_topics topic on topic.topic_id = post.topic_id topic_title '%searchterms%' or post_text '%searchterms%';
glad see you've found solution. should put sql answer.
select post.post_id, post.topic_id, topic.topic_title, post.post_text bb_posts post left join bb_topics topic on topic.topic_id = post.topic_id topic_title '%searchterms%' or post_text '%searchterms%';
Comments
Post a Comment