Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #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,
    Morticka

    #392747

    Hey 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!
    Elliott

    #392755

    Hi 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,
    Morticka

    #393020

    Hi!

    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!
    Ismael

    #393157

    Hi 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 topics

    My 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, 2 months ago by Morticka.
    #393361

    Hey!

    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, 2 months ago by Elliott.
    #393693

    Hi 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,
    Morticka

    #394019

    Hey!

    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,
    Elliott

    #394272

    Hi 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,
    Morticka

    #394709

    Hi!

    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,
    Elliott

    #395004

    Hi 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,
    Morticka

    #395036
    This reply has been marked as private.
    #395403

    Hi 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!
    Josue

    #395715
    This reply has been marked as private.
    #396361

    Hey!

    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,
    Ismael

    #396370

    Hi 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, 2 months ago by Morticka.
    #396453

    Hey!

    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,
    Josue

    #397447

    Hi 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,
    Morticka

    #397611

    Yes, as a text block. You are welcome, glad to help :)

    Cheers!
    Josue

    #1119749

    Hi.
    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!

    #1119792

    Hi,

    Unfortunately if it is conflicting with LearnDash, we aren’t able to troubleshoot third party plugin incompatibilities.

    Best regards,
    Jordan Shannon

    #1119894

    It’s not conflicting. The Avia layout isn’t showing on custom posts.
    Same issue as Morticka had.

    #1120149

    Hi,


    @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,
    Ismael

    #1120233

    Thank you.

    #1120286

    Hi yifatcohen,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 25 posts - 1 through 25 (of 25 total)
  • You must be logged in to reply to this topic.