|
/ Documentation /Integrations/ How to Enable Enfold Avia Layout Builder in CartFlows Steps?

How to Enable Enfold Avia Layout Builder in CartFlows Steps?

In order for the Enfold Avia Layout Builder to be available on CartFlows steps, the following function needs to be added to your child themes function file.

// Do not include this if already open!

/* 
* How to add the custome code. 
* 
* Please follow below instructions:
* 1. Copy the below code.
* 2. Open your child theme's functions.php file.
* 3. Paste the copied code at the very bottom of it & save the file OR upload it on your server/hosting.
*/

/**
 * Function to allow Enfold theme to edit the CartFlows pages using it's page builder.
 * 
 * @param array $supported_post_types 	Array of supported post type by the theme.
 * 
 * @return array $supported_post_types 	Modified array of supported post type by the theme.
 */
function avf_add_cartflows_post_type_in_theme( array $supported_post_types ) {
	$supported_post_types[] = 'cartflows_step';
	return $supported_post_types;
}

add_filter( 'avf_alb_supported_post_types', 'avf_add_cartflows_post_type_in_theme', 10, 1 );
add_filter( 'avf_metabox_layout_post_types', 'avf_add_cartflows_post_type_in_theme', 10, 1 );

Alternatively, you can use the free Code Snippets plugin to add custom functions to your website. While using the Code Snippets Plugin, set the code to execute to the back-end and front-end to make it work properly.

Here is a tutorial on how to add custom functions to your website.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Free Cartflows Form - Popup

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.