-
AuthorPosts
-
February 18, 2018 at 11:49 am #913877
Hi Guys,
I came across this video for adding the Avia Layout builder to custom post types: https://kriesi.at/support/topic/displaying-custom-post-types-inside-of-the-avia-layout-builder/However, I saw on another thread a moderator say that the video is outdated and not something you support any longer.
Could you let me know if it is possible to add Avia Layout builder to custom post types and if so, how to do it?
Many thanks
February 18, 2018 at 1:37 pm #913905Hey johnstanley1990,
This was a successful solution on 4/20/2017: https://kriesi.at/support/topic/how-to-use-avia-layout-builder-in-custom-post-types-made-with-toolset-plugin/#post-780613
This one was successful on 8/22/2017: https://kriesi.at/support/topic/activating-advanced-editor-in-custom-post-type/#post-842273
Hopefully these successful examples will help solve your issue.Best regards,
MikeFebruary 18, 2018 at 2:32 pm #913917Hi Mike,
Thanks for your quick response.
I found this solution – https://kriesi.at/support/topic/how-to-use-avia-layout-builder-in-custom-post-types-made-with-toolset-plugin/#post-780613
shortly after posting this, so followed the steps.It worked and the Avia layout builder appeared in my custom post type, except it disappeared on my other pages and posts.
I went back to the My Custom PhP plugin and edited the code to:
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(‘hotel’, ‘page’, ‘post’), ‘context’=>’normal’, ‘expandable’=>true );
$boxes[] = array( ‘title’ =>__(‘Layout’,’avia_framework’ ), ‘id’=>’layout’, ‘page’=>array(‘hotel’, ‘page’, ‘post’), ‘context’=>’side’, ‘priority’=>’low’);
return $boxes;
}Now this error message is coming up and I can’t get back into my site 😬
Parse error: syntax error, unexpected ”page” (T_CONSTANT_ENCAPSED_STRING), expecting ‘)’ in /home/thetra22/staging/1/wp-content/plugins/my-custom-functions/inc/php/functional.php(85) : eval()’d code on line 5
help please haha
February 18, 2018 at 2:44 pm #913923hi Mike,
no worries, I have fixed it.
Sorry for inconvenience.
Thanks
February 18, 2018 at 3:36 pm #913932Hi,
Glad to hear, do you mind posting your final code, as it could help another looking to do this?Best regards,
MikeFebruary 18, 2018 at 4:27 pm #913952Hi Mike,
It was a syntax issue with my code – forgot to ensure that the post types were separated by a comma.
Anyone having similar problems with the My Custom Function plugin go to this link for advice:
https://wordpress.org/support/topic/instruction-error/
Cheers
February 18, 2018 at 4:55 pm #913964 -
AuthorPosts
- The topic ‘Adding Avia Layout Builder to custom post type’ is closed to new replies.