Site Breaks When Trying to Add Child Theme
-
Is there anything in the parent theme functions file that would be preventing me from adding a child theme? Or could it be something else? When I activate the child theme the whole site breaks.
<?php $functions_path = TEMPLATEPATH . '/functions/'; //$includes_path = TEMPLATEPATH . '/includes/'; $includes_path = get_stylesheet_directory() . '/includes/'; //Loading jQuery and Scripts require_once $includes_path . 'theme-scripts.php'; //get_template_part('theme-scripts.php'); //Widget and Sidebar require_once $includes_path . 'sidebar-init.php'; require_once $includes_path . 'register-widgets.php'; //Theme initialization require_once $includes_path . 'theme-init.php'; //Additional function require_once $includes_path . 'theme-function.php'; //Shortcodes require_once $includes_path . 'theme_shortcodes/shortcodes.php'; //include_once(TEMPLATEPATH . '/includes/theme_shortcodes/alert.php'); get_template_part('/includes/theme_shortcodes/alert.php'); include_once(TEMPLATEPATH . '/includes/theme_shortcodes/tabs.php'); include_once(TEMPLATEPATH . '/includes/theme_shortcodes/toggle.php'); include_once(TEMPLATEPATH . '/includes/theme_shortcodes/html.php'); //tinyMCE includes include_once(TEMPLATEPATH . '/includes/theme_shortcodes/tinymce/tinymce_shortcodes.php'); //Loading theme textdomain load_theme_textdomain( 'theme1460', TEMPLATEPATH . '/languages' ); // removes detailed login error information for security add_filter('login_errors',create_function('$a', "return null;")); if ( !function_exists( 'optionsframework_init' ) ) { /*-----------------------------------------------------------------------------------*/ /* Options Framework Theme /*-----------------------------------------------------------------------------------*/ /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */ if ( STYLESHEETPATH == TEMPLATEPATH ) { define('OPTIONS_FRAMEWORK_URL', TEMPLATEPATH . '/admin/'); define('OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('template_directory') . '/admin/'); } else { define('OPTIONS_FRAMEWORK_URL', STYLESHEETPATH . '/admin/'); define('OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('stylesheet_directory') . '/admin/'); } require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php'); } // Removes Trackbacks from the comment cout add_filter('get_comments_number', 'comment_count', 0); function comment_count( $count ) { if ( ! is_admin() ) { global $id; $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id)); return count($comments_by_type['comment']); } else { return $count; } } // Custom excpert length function new_excerpt_length($length) { return 60; } add_filter('excerpt_length', 'new_excerpt_length'); // enable shortcodes in sidebar add_filter('widget_text', 'do_shortcode'); // custom excerpt ellipses for 2.9+ function custom_excerpt_more($more) { return 'Read More »'; } add_filter('excerpt_more', 'custom_excerpt_more'); // no more jumping for read more link function no_more_jumping($post) { return ' <a href="'.get_permalink($post->ID).'" class="read-more">'.'Continue Reading'.'</a>'; } add_filter('excerpt_more', 'no_more_jumping'); // category id in body and post class function category_id_class($classes) { global $post; foreach((get_the_category($post->ID)) as $category) $classes [] = 'cat-' . $category->cat_ID . '-id'; return $classes; } add_filter('post_class', 'category_id_class'); add_filter('body_class', 'category_id_class'); ?>
- The topic ‘Site Breaks When Trying to Add Child Theme’ is closed to new replies.