Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #396102

    Hi Guys -I’m running a child theme on Enfold and I’d like to add the layout builder to my custom post types. I’ve had a look at this video
    https://vimeo.com/64996057 and I’ve followed this post https://kriesi.at/support/topic/add-builder-to-other-custom-post-types/ and it works when i update the Parent theme’s meta.php file.

    howvver I want to make sure all the changes stay in the child theme – is there a way to do this?

    I’ve already tried copying the folder and file directory into my child theme directory but it doesn’t register the builder.

    Would love you help – thanks!

    #396508

    Hi ShortieD!

    please refer to this: https://kriesi.at/support/topic/meta-php-in-child-them-not-working/#post-376445

    Best regards,
    Andy

    #400437

    Hi Andy – I followed the instructions from this post and added the below code to my functions.php for my child theme – this didn’t work – I still can’t get the ‘advanced layout editor’ to appear as suggested. Any clues? Thanks

    /**ADDS THE LAYOUT EDITOR TO CPT’s*/

    add_filter( ‘avf_builder_boxes’, ‘enfold_customization_posts_builder’ );
    function enfold_customization_posts_builder( $b ){
    $b[1][‘page’] = array( ‘portfolio’, ‘page’, ‘post’, ‘people’, ‘places’, ‘stories’ );
    return $b;
    }

    #400937

    Hi!

    Try this out, https://kriesi.at/support/topic/overriding-functions-in-a-child-theme/#post-167093.

    If you want to add them to more than one CPT then keep adding new lines like so.

    $boxes[$key]['page'][] = 'people';
    $boxes[$key]['page'][] = 'places';
    $boxes[$key]['page'][] = 'stores';
    

    Best regards,
    Elliott

    #402443

    success! I added this to my functions and it worked – thanks.

    /**ADDS THE LAYOUT EDITOR TO CPT’s*/

    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’][] = ‘people’;
    $boxes[$key][‘page’][] = ‘places’;
    $boxes[$key][‘page’][] = ‘events’;
    $boxes[$key][‘page’][] = ‘stories’;
    }
    }
    return $boxes;
    }

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘adding the avia layout builder to Custom post types’ is closed to new replies.