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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -