Tagged: ENFOLD layout, learndash
-
AuthorPosts
-
February 7, 2015 at 5:29 pm #392522
Hi guys,
Where can I find the code for the Enfold post layout options? (breadcrumbs yes or no, titlebar settings etc)
I’ve been trying to get the Enfold layout options in the LearnDash Post. I know you don’t support third party plugins, but I was wondering if there was a simple solution to add the layout options to the LearnDash single post. (LearnDash is an elearning plugin like Sensei)
LearnDash recommends that to change the template files, making a copy of single.php and then changing the name to a learndash php file name. I did that but nothing changed. I was wondering if I have to put separate Enfold layout code in the single.php copy?
I’m using a child theme.
Do you have any suggestions?
Sincerely,
MortickaFebruary 8, 2015 at 5:06 pm #392747Hey Morticka!
You can use our avf_builder_boxes filter for that. Here is an example, https://kriesi.at/support/topic/add-builder-to-other-custom-post-types/#post-251989.
Cheers!
ElliottFebruary 8, 2015 at 5:34 pm #392755Hi Elliot,
Thx for your fast response on a sunday! :)
Unfortunately I have no idea how to use that code, can you be more specific?
Sincerely,
MortickaFebruary 9, 2015 at 1:33 pm #393020Hi!
Ask the plugin author for the learndash custom post type slug or name, then place it here:
add_filter('avf_builder_boxes','custom_post_types_options'); function custom_post_types_options($boxes) { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('LEARN DASH CUSTOM POST TYPE NAME HERE'), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('LEARN DASH CUSTOM POST TYPE NAME HERE'), 'context'=>'side', 'priority'=>'low'); $boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('LEARN DASH CUSTOM POST TYPE NAME HERE'), 'context'=>'normal', 'priority'=>'high' ); return $boxes; }
The code should be added to the child theme’s functions.php. Just replace the “LEARN DASH CUSTOM POST TYPE NAME HERE” part.
Cheers!
IsmaelFebruary 9, 2015 at 5:22 pm #393157Hi Ismael,
Thank you! :D
So I emailed the LearnDash plugin maker and asked for the learndash custom post type slug or name.
They gave me 4 name files:single-sfwd-courses.php for courses
single-sfwd-lessons.php for lessons
single-sfwd-quiz.php for quiz
single-sfwd-topic.php for topicsMy question, should I copy your code 4 times and each time put another filename in the place of the “LEARN DASH CUSTOM POST TYPE NAME HERE” part?
Sincerely,
Morticka- This reply was modified 9 years, 9 months ago by Morticka.
February 9, 2015 at 10:33 pm #393361Hey!
You can add multiple post types to each line like so.
$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('topics', 'quiz', 'lessons', 'courses'), 'context'=>'normal', 'expandable'=>true );
Best regards,
Elliott- This reply was modified 9 years, 9 months ago by Elliott.
February 10, 2015 at 2:30 pm #393693Hi Elliot,
I’m really sorry, but I still don’t quite understand how to use that code. I’m not a coder, I just know a little bit more than the average person :D
I’ve emailed LearnDash again, asking for the location of those files (single-sfwd-courses.php for courses etc) because I can’t find them anywhere, but apparently I have to copy and rename Enfolds single.php 4 times.
LearnDash also said: “The post type slugs are as follow:
sfwd-courses
sfwd-lessons
sfwd-topic
sfwd-quiz
”So, if I take Enfolds single.php and use those slug names, where exactly do I put the code? Let’s say sfwd-courses for instance?
Sincerely,
MortickaFebruary 10, 2015 at 10:00 pm #394019Hey!
Add this to the bottom of your functions.php file.
add_filter('avf_builder_boxes','custom_post_types_options'); function custom_post_types_options($boxes) { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('sfwd-courses', 'sfwd-lessons', 'sfwd-topic', 'sfwd-quiz'), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('sfwd-courses', 'sfwd-lessons', 'sfwd-topic', 'sfwd-quiz'), 'context'=>'side', 'priority'=>'low'); $boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('sfwd-courses', 'sfwd-lessons', 'sfwd-topic', 'sfwd-quiz'), 'context'=>'normal', 'priority'=>'high' ); return $boxes; }
Regards,
ElliottFebruary 11, 2015 at 12:39 pm #394272Hi Elliot,
Terrific, it works, I even have the Avia Layout Builder in the learndash posts!!! :D
But, when I go to Pages, the Avia Layout Builder option has disappeared and I just see all the shortcodes? How can I get the Avia Layout Builder back?
Sincerely,
MortickaFebruary 11, 2015 at 10:11 pm #394709Hi!
Sorry, try this instead.
add_filter('avf_builder_boxes', 'avia_register_meta_boxes', 10, 1); //Add meta boxes to custom post types function avia_register_meta_boxes($boxes) { if(!empty($boxes)) { foreach($boxes as $key => $box) { $boxes[$key]['page'][] = 'sfwd-courses'; $boxes[$key]['page'][] = 'sfwd-lessons'; $boxes[$key]['page'][] = 'sfwd-topics'; $boxes[$key]['page'][] = 'sfwd-quiz'; } } return $boxes; }
Regards,
ElliottFebruary 12, 2015 at 2:24 pm #395004Hi Elliot,
Yes, you fixed it, thank you very much!! :D
Just one question:
I am missing the option “Don’t display image on single post” at the “Add featured image” menu in the learndash posts (sfwd-courses, sfwd-lessons and sfwd-topic).Is there any way you can fix that too? :D
Sincerely,
MortickaFebruary 12, 2015 at 2:55 pm #395036This reply has been marked as private.February 12, 2015 at 11:26 pm #395403Hi Morticka!
I’m not seeing that text (Status van de module: Nog niet gestart) below the logo on the link you posted.
Refer to the following regarding the hide featured image checkbox on custom post types:
https://kriesi.at/support/topic/featured-image-checkbox/
https://kriesi.at/support/topic/checkbox-to-hide-featured-images-in-cpt/Cheers!
JosueFebruary 13, 2015 at 2:03 pm #395715This reply has been marked as private.February 15, 2015 at 1:05 pm #396361Hey!
Look for this line:
if($post_type == “sfwd-courses” || $post_type == “sfwd-lessons”)
Add the default post:
if($post_type == "post" || $post_type == “sfwd-courses” || $post_type == “sfwd-lessons”)
Regards,
IsmaelFebruary 15, 2015 at 1:30 pm #396370Hi Ismael,
Of course, thanks!! It works :)
Now only the text that appears when logged in remains (at question #395036 ), do you have a solution for that as well?
Sincerely,
Morticka- This reply was modified 9 years, 9 months ago by Morticka.
February 15, 2015 at 7:21 pm #396453Hey!
You’d need to place it manually in the Advanced Layout Builder (http://screencast.com/t/Voo9unvetu). Also, add this to Quick CSS to hide the automatic insertion by the plugin (only on ALB-enabled courses):
.single-sfwd-courses #main > .learndash > #learndash_course_status { display: none !important; }
Best regards,
JosueFebruary 17, 2015 at 1:25 pm #397447Hi Josue,
Manually, as in textblock or something like that? Very nice screencast, I was searching for a LearnDash plugin option in the ALB menu, haha!!
Thx, the code worked, the text is gone :D
Sincerely,
MortickaFebruary 17, 2015 at 5:13 pm #397611Yes, as a text block. You are welcome, glad to help :)
Cheers!
JosueJuly 18, 2019 at 2:49 am #1119749Hi.
This no longer works with the updated LearnDash version.
Being that it’s been 4 years.. I guess that’s ok.How can I solve this?
Thank you!
July 18, 2019 at 6:53 am #1119792Hi,
Unfortunately if it is conflicting with LearnDash, we aren’t able to troubleshoot third party plugin incompatibilities.
Best regards,
Jordan ShannonJuly 18, 2019 at 12:31 pm #1119894It’s not conflicting. The Avia layout isn’t showing on custom posts.
Same issue as Morticka had.July 19, 2019 at 12:09 pm #1120149Hi,
@yifatcohen: You have to use this filter now.// https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type
function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'YOUR CUSTOM POST NAME'; $supported_post_types[] = 'YOUR CUSTOM POST NAME'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
Best regards,
IsmaelJuly 19, 2019 at 3:43 pm #1120233Thank you.
July 19, 2019 at 5:25 pm #1120286Hi yifatcohen,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.