
-
AuthorPosts
-
November 3, 2020 at 9:22 pm #1258137
Hello from Germany,
my client, who runs a school for traditional chinese healing, has your Enfold theme and is happily using the Avia layout builder for all his page editing.
However, when editing LearnDash course topics (which in fact is just another taxonomy and looks almost identical to page editing or post editing), he cannot access the Avia layout builder and has to use the WordPress standard classic editor, which means no columns, no nifty layouts, and makes for rather boring course pages.
He asked me if there is any way to activate the Avia layout builder also for course topics (which is the third level / content level of course hierarchy: Course – Lecture – Topic, and in fact just a WordPress page).
Since the Avia layout builder can also be used on other taxonomies, such as WooCommerce product pages, I assume that it could somehow be registered to also be active on course topic pages? But I have no idea how to do that.
Since my client has been using the Avia layout builder for all his WordPress content so far, being forced to use the Classic editor feels like a major handicap for him now, and he has no idea how to build beautiful course topic content without it.
Any idea?
November 5, 2020 at 5:49 am #1258518Hey sescha,
Please refer to this: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type
Best regards,
RikardNovember 5, 2020 at 5:35 pm #1258679Hey Rikard,
thanks for the link and your help, this is exactly what I was hoping for.While I understand the code, it seems that your instructions on that page contain an error. To be absolutely sure:
Instead of
“Make sure to replace the word ‘post’ with your custom post type.”
shouldn’t it read:
“Make sure to replace the word ‘CUSTOM_POST_NAME’ with your custom post type.”Thanks,
SebastianNovember 6, 2020 at 5:10 pm #1258918Hi Sebastian,
That is true. Thanks for the heads up. I just updated the page :)
Following code should activate ALB on LearnDash
function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'sfwd-lessons'; $supported_post_types[] = 'sfwd-courses'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
Best regards,
YigitNovember 6, 2020 at 6:24 pm #1258932Hi Yigit,
thanks for your message and the copy-and-paste example on how to activate ALB for LearnDash pages.
Allow me to add the following line of code, which activates ALB on the “topics” level:$supported_post_types[] = ‘sfwd-topic’;
Strangely enough, LearnDash’s custom taxonomies for courses and lessons are plural (sfwd-lessons, sfwd-courses), whereas the taxonomy for the lowest level of content, the topics, are labelled as singular (sfwd-topic).
So if you are using LearnDash, the whole code to go into your functions.php should read like this:
function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'sfwd-lessons'; $supported_post_types[] = 'sfwd-courses'; $supported_post_types[] = 'sfwd-topic'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
Best regards,
SebastianNovember 7, 2020 at 2:13 pm #1259047Hi,
Great! Thanks for sharing Sebastian!
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Enjoy the rest of your day!
Best regards,
Yigit -
AuthorPosts
- The topic ‘LearnDash: Editing topics with the Avia Layout Builder instead of Classic Editor’ is closed to new replies.