I have installed WordPress and have installed a child theme based on twentyeleven. I have added three template files to the directory containing the child theme. They are:
style.css
/*
Theme Name: Cinema Verde
Theme URI: http://wordpress.org/extend/themes/twentyeleven
Author: Arthur Ianuzzi - Omicron Marketing
Author URI: http://www.omicron-marketing.com
Description: Theme for Cinema Verde, child theme based on TwentyEleven
Version: 1.0
License: GNU General Public License
License URI: license.txt
Tags: dark, black, gray, two-columns, right-sidebar, fixed-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
Template: twentyeleven
*/
@import url('../twentyeleven/style.css');
custom-style.css
#access { background: #000; border-top: 2px solid #84E41F; border-bottom: 2px solid #84E41F; }
#access a { color: #fff; }
#access a:focus { color: #fff;}
#access ul ul :hover a { background: #000; color: #fff; }
#access li:hover a {color: #84E41F; background: #000; border-bottom: 0 ; }
#branding #searchform {display:none; }
h1.entry-title {color: #84E41F;}
and functions.php
<?php
/** Tell WordPress to run post_theme_setup() when the 'after_setup_theme' hook is run. */
add_action( 'after_setup_theme', 'post_theme_setup' );
if ( !function_exists( 'post_theme_setup' ) ):
function post_theme_setup() {
/* Add our new styles after all stylesheets have loaded */
function twentyeleven_enqueue_child_style() {
wp_enqueue_style( 'child_style', get_stylesheet_directory_uri() . '/custom-style.css', array(), null );
do_action( 'twentyeleven_enqueue_child_style', 'child_style' );
}
add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_child_style', 11 );
}
endif;
?>
Everything works fine, except that when I’m in the dashboard and I change something, the confirmation page comes up blank. For example, if I write a new post, and click “Publish”, I get a blank page instead of a page showing me the post I just wrote.
You run a function in a function, your code is broken….
Turn on wp_debug and you will see the error.
Side note:
You do know including multiple stylesheets will make your site slower?
Good that you are using the enqueue btw