Auto-Create New Forum Topics from New Courses in LearnDash
Quote from Nim on September 23, 2020, 9:48 amHello,
I am using LearnDash and I noticed that new topics cannot be autogenerated (or at least assigned to a forum from the wordpress post editor) as LearnDash have their own custom post types. Is this correct?
On the left hand bar, under “create forum topic” with the dropdown to choose a forum it is not showing in the course post page (as it shows in WordPress regular pages and posts area of the dashboard).
Is there a way to enable this and make this option available? Where would be the best place to start inspecting how to add LearnDash post types?
Thanks in advance!
Hello,
I am using LearnDash and I noticed that new topics cannot be autogenerated (or at least assigned to a forum from the wordpress post editor) as LearnDash have their own custom post types. Is this correct?
On the left hand bar, under “create forum topic” with the dropdown to choose a forum it is not showing in the course post page (as it shows in WordPress regular pages and posts area of the dashboard).
Is there a way to enable this and make this option available? Where would be the best place to start inspecting how to add LearnDash post types?
Thanks in advance!
Quote from qualmy91 on September 24, 2020, 8:04 amHey @nim,
it’s not possible at the moment to add the meta box to a custom post type.
I added a filter to add this functionality to the forum in this pull request:
https://github.com/Asgaros/asgaros-forum/pull/293
This filter will be available with the next update, if @asgaros will approve this changes.
To use this filter you can easily use the following code and change “custom_post-type” to the post type that LearnDash is using.
add_filter('asgarosforum_filter_meta_post_type', 'add_post_type'); // Add custom post type to the list of post types function add_post_type ($post_types){ $post_types[] = 'custom_post_type'; return $post_types; }
Hey @nim,
it’s not possible at the moment to add the meta box to a custom post type.
I added a filter to add this functionality to the forum in this pull request:
https://github.com/Asgaros/asgaros-forum/pull/293
This filter will be available with the next update, if @asgaros will approve this changes.
To use this filter you can easily use the following code and change “custom_post-type” to the post type that LearnDash is using.
add_filter('asgarosforum_filter_meta_post_type', 'add_post_type'); // Add custom post type to the list of post types function add_post_type ($post_types){ $post_types[] = 'custom_post_type'; return $post_types; }
Quote from Nim on September 25, 2020, 10:16 amHi @qualmy91
Appreciate your response! I tried to integrate the code you supplied but it didn’t work to show the metabox. LearnDash uses sfwd-courses, sfwd-lessons, etc. for its CPT. Any ideas why?
I also greatly appreciate the issuing of the pull request. I hope Asgaros can implement those changes, as I am sure I’m not alone in this type of requirement? 🙂
Hi @qualmy91
Appreciate your response! I tried to integrate the code you supplied but it didn’t work to show the metabox. LearnDash uses sfwd-courses, sfwd-lessons, etc. for its CPT. Any ideas why?
I also greatly appreciate the issuing of the pull request. I hope Asgaros can implement those changes, as I am sure I’m not alone in this type of requirement? 🙂
Quote from qualmy91 on September 25, 2020, 11:06 amHey @nim,
the code will only work when the pull request will be approved.
For your 2 CPT you can use it like this:
add_filter('asgarosforum_filter_meta_post_type', 'add_post_type'); // Add custom post type to the list of post types function add_post_type ($post_types){ $post_types[] = 'fwd-courses'; $post_types[] = 'sfwd-lessons'; return $post_types; }
Hey @nim,
the code will only work when the pull request will be approved.
For your 2 CPT you can use it like this:
add_filter('asgarosforum_filter_meta_post_type', 'add_post_type'); // Add custom post type to the list of post types function add_post_type ($post_types){ $post_types[] = 'fwd-courses'; $post_types[] = 'sfwd-lessons'; return $post_types; }
Quote from Nim on September 27, 2020, 2:58 pmHi @qualmy91
Ahh, I see! Sorry, I obviously hadnt read your message properly.. 🙂
Thank you again and hope to the pull request will be approved soon. Have a great weekend!
Hi @qualmy91
Ahh, I see! Sorry, I obviously hadnt read your message properly.. 🙂
Thank you again and hope to the pull request will be approved soon. Have a great weekend!
Quote from Asgaros on October 3, 2020, 7:52 amHello @nim @qualmy91
I just approved the PR and the filter will be available very soon via the updater!
I just approved the PR and the filter will be available very soon via the updater!
Quote from Nim on October 3, 2020, 3:55 pmHi @asgaros,
That’s brilliant! Thank you!
Do you have any estimated release date for the update? If not, no worries..we’ll hang tight! 🙂
Hi @asgaros,
That’s brilliant! Thank you!
Do you have any estimated release date for the update? If not, no worries..we’ll hang tight! 🙂
Quote from qualmy91 on October 4, 2020, 7:39 amHey @nim,
the new filter is now available:
Changelog
1.15.8
- Added: asgarosforum_filter_meta_post_type filter
- Fixed: Broken TinyMCE-editor in the administration-area
- Performance improvements and code optimizations
Hey @nim,
the new filter is now available:
Changelog
1.15.8
- Added: asgarosforum_filter_meta_post_type filter
- Fixed: Broken TinyMCE-editor in the administration-area
- Performance improvements and code optimizations
Quote from Nim on October 4, 2020, 8:20 amHi @qualmy91,
I saw that! Thank you soooo much for your help. Asgaros is an amazing Forum plugin (planning to leave a review next) and the community is just as amazing! I will pay it forward whenever I can 🙂
Have a great day!
Hi @qualmy91,
I saw that! Thank you soooo much for your help. Asgaros is an amazing Forum plugin (planning to leave a review next) and the community is just as amazing! I will pay it forward whenever I can 🙂
Have a great day!