Tagged: ALB, Layout Builder, learndash, settings
-
AuthorPosts
-
May 12, 2020 at 12:21 pm #1212121
Hi guys,
When I tried to use LearnDash with the Enfold Advanced Layout Builder (snippets copied from https://kriesi.at/support/topic/urgent-need-layout-builder-for-all-post-types-code-not-working/) , I encountered 2 problems with courses/lessons (page/post):
1. The LearnDash settings disappear and turn into a duplicate page/post, when I activate the ALB in courses, lessons etc.
2. When I try to use the text block element on the page/post in LearnDash, it partially gets covered by the Worpress admin settings bar.This is the code I used to activate ALB etc for Learndash posts/pages:
function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'sfwd-courses'; $supported_post_types[] = 'sfwd-lessons'; $supported_post_types[] = 'sfwd-topic'; $supported_post_types[] = 'sfwd-quiz'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1); function avf_metabox_layout_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'sfwd-courses'; $supported_post_types[] = 'sfwd-lessons'; $supported_post_types[] = 'sfwd-topic'; $supported_post_types[] = 'sfwd-quiz'; return $supported_post_types; } add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
I made a quick video (under a minute) in the private content to show you what I mean.
How can I fix this? Can you please help me?
Sincerely,
MortickaMay 15, 2020 at 10:18 am #1213210Hello, anybody home? :)
May 17, 2020 at 3:14 am #1213701This will fix #2 install and activate the Admin CSS MU plugin from WordPress plugin repository
Then go to Appearance > Admin CSS MU
and add this snippet
.avia-modal.modal-preview-active.modal-preview-large {
left: 160px !important;
right: 0 !important;
}
as for missing setting opent the screen options up top and see if the settings checkboxes your looking for are unchecked. I have to do this everytime I edit the page.Note: I am just a user and not a moderator
- This reply was modified 4 years, 7 months ago by jacqueschoquette.
May 17, 2020 at 11:35 am #1213783Thx for your tip Jacqueschoquette! :) I just don’t know how and if this will effect other parts of wordpress/enfold. About the settings, I don’t think we’re talking about the same thing. In LearnDash the page gets duplicated were the settings were.
Could the Enfold support team respond? It’s been 5 days, not a word,
Morticka
May 17, 2020 at 5:42 pm #1213830No problem I have the same issue as you outlined in number two the CSS fix work for me for the last couple of weeks I don’t see this other issue that you have though.
probably pretty obvious but I would back up the site disable all plugins but in enfold and learndash and see if the problem is still there also make sure learndash – is up to date.
May 17, 2020 at 9:34 pm #1213867Hi,
Sorry for the late reply, thanks for the video and login, for the first issue I found that a!important;
was causing the builder to show on each tab. The file is at:/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/css/avia-builder.css
starting on line 24 find:#avia_builder{ float:left; width:100%; display: block !important; }
change to:
#avia_builder{ float:left; width:100%; display: block; }
I did this for you but you will have to clear your browser cache.
For your second issue I added the css from @jacqueschoquette, thanks :).avia-modal.modal-preview-active.modal-preview-large { left: 160px !important; right: 0 !important; }
It is also now working, please check.
Best regards,
MikeMay 18, 2020 at 10:22 am #1213967Wonderful, thx Mike (and @jacqueschoquette :) )
It looks good! One problem though, I’m using a child theme and when Enfold gets an update, all the settings are gone.
Can they be moved to my child theme?
Sincerely,
MortickaMay 18, 2020 at 1:51 pm #1214038Hi,
Glad to hear this is helping, unfortunately we can’t move the css to your child theme. Typically, we would override css with the!important;
but there is no solution for removing the!important;
without another one.
So I followed @jacqueschoquette’s suggestion and installed the Admin CSS MU plugin and copied all of the modified /avia-builder.css css to it, and then added this script to remove the original cssfunction custom_script(){ ?> <script> (function($){ $(document).ready(function(){ $("link[href*='/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/css/avia-builder.css']").remove(); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
I tested this on your site and it is working and you should not have to update this file after the next update.
Please clear your browser cache and check.Best regards,
MikeMay 19, 2020 at 11:40 am #1214295Hi Mike,
Great, that works, thank you very much! :D
Sincerely,
MortickaMay 19, 2020 at 12:48 pm #1214317Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘2 Problems with ALB code for LearnDash, please help?’ is closed to new replies.