How to Convert Child Themes + Custom Post Types for Avada 5.0

How to Convert Child Themes + Custom Post Types for Avada 5.0

If you would like to convert your Custom Post Types within your Child Theme, then please follow the steps below.
How To Convert Only Custom Post Types in Child ThemesStep 1 – Add this code snippet to your child theme』s functions.php file:
Copy to Clipboardfunction add_custom_post_types( $post_types ) {
$my_post_types = array(
'my_post_type',
);
return $my_post_types;
}
add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' ); 1function add_custom_post_types( $post_types ) {2    $my_post_types = array(3        'my_post_type',4   );5    return $my_post_types;6}7add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );Step 2 – Replace
Copy to Clipboardmy_post_typexxxxxxxxxx1 1my_post_type inside the array with your own Custom Post Type name. For example:
Copy to Clipboardfunction add_custom_post_types( $post_types ) {
$my_post_types = array(
'courses',
);
return $my_post_types;
}
add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );xxxxxxxxxx7 1function add_custom_post_types( $post_types ) {2    $my_post_types = array(3        'courses',4   );5    return $my_post_types;6}7add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );Step 3 – Re-run the conversion script manually. To learn how, click here. It』s important to make sure your Child Theme is active before running the conversion.
How To Convert Custom Post Types and Default Post Types in Child ThemesStep 1 – Add this code snippet to your child theme』s functions.php file:
Copy to Clipboardfunction add_custom_post_types( $post_types ) {
$my_post_types = array(
'my_post_type',
);

$my_post_types = array_merge( $post_types, $my_post_types );

return $my_post_types;
}
add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );​x 1function add_custom_post_types( $post_types ) {2    $my_post_types = array(3        'my_post_type',4   );5​6    $my_post_types = array_merge( $post_types, $my_post_types );7​8    return $my_post_types;9}10add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );Step 2 – Replace
Copy to Clipboardmy_post_typexxxxxxxxxx1 1my_post_type inside the array with your own Custom Post Type name. For example:
Copy to Clipboardfunction add_custom_post_types( $post_types ) {
$my_post_types = array(
'courses',
);

$my_post_types = array_merge( $post_types, $my_post_types );

return $my_post_types;
}
add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );xxxxxxxxxx10 1function add_custom_post_types( $post_types ) {2    $my_post_types = array(3        'courses',4   );5​6    $my_post_types = array_merge( $post_types, $my_post_types );7​8    return $my_post_types;9}10add_filter( 'fusion_builder_shortcode_migration_post_types', 'add_custom_post_types' );Step 3 – Re-run the conversion script manually. To learn how, click here. It』s important to make sure your Child Theme is active before running the conversion.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註