WordPress.org

Ready to get started?Download WordPress

Forums

Editor
[resolved] editor-font-awesome-css, ie7-style and child theme (3 posts)

  1. Per Soderlind
    Member
    Posted 1 month ago #

    Not sure if this is "by design" but the theme will break if I create a child theme and forget to copy /inc/fontawesome/font-awesome.css and /inc/styles/ie.css to the child.

    It's easily fixed by changing get_stylesheet_directory_uri to get_template_directory in functions.php:function editor_scripts() {} as in:

    function editor_scripts() {
    	wp_enqueue_style( 'editor-style', get_stylesheet_uri() );
    
    	/**
         * FontAwesome Icons Stylesheet
         */
    	wp_enqueue_style( 'editor-font-awesome-css', get_template_directory() . "/inc/fontawesome/font-awesome.css", array(), '4.1.0', 'screen' );
    
    	/**
         * Conditionally load our stylesheet for Internet Explorer. Yuck!
         */
        wp_enqueue_style( 'ie7-style', get_template_directory() . '/inc/styles/ie.css' );
        .
        .
        .
  2. mindctrl
    Member
    Posted 1 month ago #

    Hey there,

    Thanks for bringing this to our attention. We'll get this fixed in the next release.

    Heads up, your change isn't using the correct function. get_template_directory() returns the file system path. You need to use get_template_directory_uri() to return the URI.

  3. Per Soderlind
    Member
    Posted 3 weeks ago #

    Yepp .. was a bit quick, get_template_directory_uri() is the correct function.

    Just updated to 1.0.4 and I can confirm it works fine with my child theme :)

    Thanks

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.