Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1148166

    Hi, is there a way to turn on the Avia Layout Builder to design a blog post or custom post type post like you would a page?

    If so, please let me know how.

    Thanks,
    Robin

    #1148392

    Hey Robin,

    Yes, you can do that by simply clicking the Advanced Layout Editor button after you have created a new post.

    Best regards,
    Rikard

    #1148718

    Thank Rikard, I just checked and regular Posts DO have the advanced layout editor button but my Custom Post Type posts do not (as seen here: https://monosnap.com/file/i0g3KAaXuFNOJVd3u3LXmufwusRcqo)

    Is there a way to turn on the Advanced Layout Editor for custom post types so that it appears in the editor for those posts?

    Thanks
    Robin

    #1148846

    Hi,

    Please try this in functions.php, add your post types in the array in the function:

    /**
     * Advanced Layout Builder Custom Post Types
     */
    add_filter('avf_alb_supported_post_types', function ($array) {
        $array[] = 'type';
        return $array;
    });

    Best regards,
    Rikard

    #1150703

    Hi Rikard,

    I tried implementing your suggested code snippet into the functions.php but the site broke.

    Here’s a video of what I did. Please let me know where I went wrong:

    1. Did I put the post type name in the correct spot?
    2. Did I get the post type name right? If not, please let me know how to find the correct name.
    3. What’s the format for adding multiple post type names to your code snippet?

    Note: bolding or using colours to specify a position in a code snippet will help me since I’m not a developer!

    Thanks so much for your help!

    #1151823

    Hi,

    Sorry for the delay. You should use the slug instead of the custom post type (CPT) name, so this would be the final code.

    /**
     * Advanced Layout Builder Custom Post Types
     */
    add_filter('avf_alb_supported_post_types', function ($array) {
        $array[] = 'salsa-lessons';
        return $array;
    }, 10, 1);

    And if you want to enable the builder for another CPT, copy the part where we add the CPT slug, paste it underneath it, then once again use the slug of the other post type.

    Best regards,
    Ismael

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