Conversation
supportAny idea of how I’d limit topics to only those from a particular forum? I’ve tried post=53 (what shows up in the address bar in the admin panel), post-id=53, forum-id=53 and a few other tries as well. Any guidance? Thanks for the very useful plugin https://wordpress.org/plugins/acf-recent-posts-widget/
Hello Kineta, At the moment this is unachievable withoty any custom code. bbPress stores the information on what Forum Topic belongs to by parent – child relation which is unsupported by the plugin. And since I haven’t had any requests of that sort I’m not planning on adding the feature yet. In that case you will need to use the acf_rwp_query filter and add the parent=$forum_id to the query variable. Needless to say this requires programming knowledge. I’ve created a working snippet for you: https://gist.github.com/gicolek/96c36093be971332acb82f1e7e347bd8 This will apply everywhere you have your widget specified. Obviously you will need to alter the id inside. You can copy and paste the code into your functions.php file of your active theme. Regards, Rafal
@gicolek – Thank you so much for taking the time to write that bit of code and answer my question. Using that code would pretty much limit the widget to showing a single use, correct?
Thanks 🙂 you need to change 126 to the id of your forum which can be obtained from the url of your admin screen while editing the specific forum you want to list the topics from 🙂
Thanks, that became obvious after I posted my question 😉 It’s a very useful plugin. I’m using it in one place to show forum topics with a particular tag and another to show a category. I’ll find another solution for the bbPress forums so I won’t lose the other uses. Thanks much for your help.
Anytime Kineta 🙂
Resolving the topic 🙂
Hello Kineta, At the moment this is unachievable withoty any custom code. bbPress stores the information on what Forum Topic belongs to by parent – child relation which is unsupported by the plugin. And since I haven’t had any requests of that sort I’m not planning on adding the feature yet. In that case you will need to use the acf_rwp_query filter and add the parent=$forum_id to the query variable. Needless to say this requires programming knowledge. I’ve created a working snippet for you: https://gist.github.com/gicolek/96c36093be971332acb82f1e7e347bd8 This will apply everywhere you have your widget specified. Obviously you will need to alter the id inside. You can copy and paste the code into your functions.php file of your active theme. Regards, Rafal
@gicolek – Thank you so much for taking the time to write that bit of code and answer my question. Using that code would pretty much limit the widget to showing a single use, correct?
Thanks 🙂 you need to change 126 to the id of your forum which can be obtained from the url of your admin screen while editing the specific forum you want to list the topics from 🙂
Thanks, that became obvious after I posted my question 😉 It’s a very useful plugin. I’m using it in one place to show forum topics with a particular tag and another to show a category. I’ll find another solution for the bbPress forums so I won’t lose the other uses. Thanks much for your help.
Anytime Kineta 🙂
Resolving the topic 🙂