Tagged: avia layout builder
-
AuthorPosts
-
October 15, 2019 at 7:23 pm #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,
RobinOctober 16, 2019 at 10:56 am #1148392Hey Robin,
Yes, you can do that by simply clicking the Advanced Layout Editor button after you have created a new post.
Best regards,
RikardOctober 16, 2019 at 11:40 pm #1148718Thank 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
RobinOctober 17, 2019 at 9:51 am #1148846Hi,
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,
RikardOctober 24, 2019 at 1:33 am #1150703Hi 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!
October 28, 2019 at 4:47 pm #1151823Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.