Skip to content

Instantly share code, notes, and snippets.

@kary4
Created July 10, 2015 17:29
Show Gist options
  • Save kary4/614b6e9ef1f40b8364df to your computer and use it in GitHub Desktop.
Save kary4/614b6e9ef1f40b8364df to your computer and use it in GitHub Desktop.
child theme
<?php
remove_action( 'after_setup_theme', 'et_setup_theme' );
function et_setup_theme_custom() {
global $themename, $shortname, $et_store_options_in_one_row, $default_colorscheme;
$themename = 'Divi';
$shortname = 'divi';
$et_store_options_in_one_row = true;
$default_colorscheme = "Default";
$template_directory = get_template_directory();
require_once( $template_directory . '/epanel/custom_functions.php' );
require_once( $template_directory . '/includes/functions/comments.php' );
require_once( $template_directory . '/includes/functions/sidebars.php' );
load_theme_textdomain( 'Divi', $template_directory . '/lang' );
require_once( $template_directory . '/epanel/core_functions.php' );
require_once( $template_directory . '/epanel/post_thumbnails_divi.php' );
include( $template_directory . '/includes/widgets.php' );
register_nav_menus( array(
'primary-menu' => __( 'Primary Menu', 'Divi' ),
'secondary-menu' => __( 'Secondary Menu', 'Divi' ),
'footer-menu' => __( 'Footer Menu', 'Divi' ),
) );
// don't display the empty title bar if the widget title is not set
remove_filter( 'widget_title', 'et_widget_force_title' );
remove_filter( 'body_class', 'et_add_fullwidth_body_class' );
add_action( 'wp_enqueue_scripts', 'et_add_responsive_shortcodes_css', 11 );
add_theme_support( 'post-formats', array(
'video', 'audio', 'quote', 'gallery', 'link'
) );
add_theme_support( 'woocommerce' );
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
add_action( 'woocommerce_before_main_content', 'et_divi_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
add_action( 'woocommerce_after_main_content', 'et_divi_output_content_wrapper_end', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
// deactivate page templates and custom import functions
remove_action( 'init', 'et_activate_features' );
remove_action('admin_menu', 'et_add_epanel');
}
add_action( 'after_setup_theme', 'et_setup_theme_custom' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment