I am not familiar with bbpress, but I think that first you need to get the forums in your site and then you need to loop through its topics to obtain the topic that matches your criteria of popular topics. You can search in the docs or source code to find the functions and methods that might help you with that. get_forums()
for example might help.
Once you get the popular topic, you will have to fetch the data that you need from it and use this data in constructing the post using wp_insert_post()
function. This answer will help building your function and hooking it to the appropriate WP action.
Related Posts:
- How to delete the Hello Dolly plugin automatically?
- Show Similar Post Titles ( Similar to Stack Exchange )
- How do I unlock a post programmatically?
- Delete Post With No Traffic?
- WP get_permalink Return Wrong URL
- Is there a plugin to display certain posts on certain pages? [closed]
- plugin for wp_list_categories with posts
- Replace existing pages with new pages, keep menu links
- Use plugin or custom post type for game score functionality
- Output HTML only on individual post view
- View Private Published Page with URL Code (no login required)
- Add category selection to custom post type (plugin)
- Redirect to another page using contact form 7? [closed]
- Moving FB comments at the end of page
- How can i summerize posts or news automatically in word press site?
- Delete data from custom table when deleting a post
- Link Posts to External URL
- Summary and Comments on Main landing Page
- Method/Plugin/Hack to Start a Post with an Writing Outline?
- Style WordPress Custom Post Type Single Page
- Posts are deleted everyday at night
- Issues with Post 2 Post Plugin
- Get page type to display content
- I want to remove the register/login WordPress top bar from my website
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]
- Looking for membership style plugin with edit option [closed]
- Best collection of code for your 'functions.php' file [closed]
- Should all plugins be encapsulated in a Class?
- OpenID for WordPress 3.x? [duplicate]
- Get a button for in the Editor
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- Which functions in theme or plugin load first
- Fastest way to loop through all posts?
- WP Plugin for Terms of Use
- Woocommerce: Changing the variations select default value? [closed]
- Automagic Link Shortening for Non-Hosted WP
- Akismet plugin is deleting spam despite preferences
- Distributing and packaging plugins
- Multiple Instances sharing the same database in a development environment
- Tag link suggestion plugin
- Collaborative post submission [closed]
- How to add rewrite rules and pagination to retrieve attachments files?
- Two people sharing user in WordPress [closed]
- The problem with WordPress Importer
- Input with spaces in Shortcode attributes overwritten by defaults
- Do widget options need to be escaped widget()?
- Is there any W3C compatible Share & Follow plugin?
- Matching Chapters to a Custom posts [closed]
- WordPress display breadcrumbs using Yoast plugin [closed]
- Excerpts on category page
- External RSS feed to WordPress Portfolio
- Getting Theme element into plugins page editor in wp admin
- GeoMashup plugin: how to customize cluster markers / icons? [closed]
- Would Gutenberg be considered a PlugIn?
- pagination on data fetched using SQL query
- Basic gallery plugin suggestion [closed]
- How do I automatically generate pages from a database?
- Duplicate New User Registration notices (BuddyPress and bbPress both installed)
- Free paypal cart solution [closed]
- Which plugin can do horizontal scrolling of RSS feeds in WordPress [closed]
- I am trying to make a field show and save from quickedit screen
- Flickering sidebar when scrolling page [closed]
- Where Should i write the code for wordpress ajax voting?
- Post status doesn’t update to ‘future’ every time?
- Grab ID from post from plugin and use it to create an object
- WP::is_main_query() Not Working
- Widget where it can make changes to the container
- how can authors to define custom pages?
- Can’t create new CPTs when menu hidden
- Gathering all Custom Post Type posts in to array/object the proper way
- Multiple Post Thumbnails Plugin – Need help with code
- How to prevent plugin, theme installation failures on WordPress?
- Update existing post dates to random dates and time
- WordPress search input in database, to edit information via form and update the database
- HTTP Error upload ( localhost )
- Post source link plugin – small modification
- Can we hide a certain user in WP?
- How Can I Increase Breadcrumb Position Count (Starting From 2)?
- Load my Inline js footer area
- Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
- How to echo a PHP Code After the Content
- WordPress Product Detail and catalog
- Flexslider empty slide
- Identify if the_post hook is being called from the admin post list
- Share on social media created listing after submission
- Translation plugin with default language?
- database – multiple wordpress installations using same database – can they share plugin settings?
- How to Save settings of custom tab product page in admin side in a database?
- Custom pages with plugin
- Displaying friend’s posts only
- Which One Is Better For Managing Add Ons For Extensible Plugin?
- Hidden Some Setting on Post or Page [duplicate]
- WordPress list child pages of custom post type
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- WordPress Code Access to Restricted Content without Registration
- How to delete unnecessary custom post types in the UI
- What can I do to customize a widget provided with this plugin? from where have I to start?
- How to pre-set WordPress settings for specific posts?
- How to Add Extra Text In WordPress Title Before Post Publish
- How to update a lot of posts on my WP site with additional content?