• Hi there. I’ve been attempting to use a child theme of esteem by using the following code in my functions.php file:

    `
    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘esteem_style’, get_template_directory_uri() . ‘/style.css’ , array() );
    wp_enqueue_style( ‘esteem-responsive’, get_template_directory_uri() . ‘/responsive.css’ );
    wp_enqueue_style( ‘esteem-fontawesome’, get_template_directory_uri() .’/fontawesome/css/font-awesome.css’, array(), ‘3.2.1’ );
    wp_enqueue_style( ‘esteem_admin_style’, get_template_directory_uri() . ‘/admin.css’ );
    wp_enqueue_style( ‘cc-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘esteem_style’ )
    );
    }

    remove_action(‘wp_head’, ‘esteem_custom_css’);

    ?>
    `

    My child’s style isn’t showing up at all when the site is generated. I know that I can use the custom css box under theme options, but I’d rather have all my code in the normal place.

Viewing 7 replies - 1 through 7 (of 7 total)
  • If it not showing try looking at your style.css header to make sure you didn’t do anything wrong. It the only required file in a child theme the functions.php file wouldn’t keep it from being visible.

    Thread Starter Hmathison84

    (@hmathison84)

    Whoops, the code up there is from when I was tinkering around, here’s the actual code:

    `
    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘esteem_style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘esteem-responsive’, ESTEEM_CSS_URL . ‘/responsive.css’ );
    wp_enqueue_style( ‘esteem-fontawesome’, get_template_directory_uri().’/fontawesome/css/font-awesome.css’, array(), ‘3.2.1’ );
    wp_enqueue_style( ‘esteem_admin_style’, ESTEEM_ADMIN_CSS_URL. ‘/admin.css’ );
    wp_enqueue_style( ‘CC-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘esteem_style’ )
    );
    }
    ?>
    `

    Thread Starter Hmathison84

    (@hmathison84)

    I don’t think the header is the problem:

    /*
    Theme Name: CC
    Theme URI: http://hmdesignnh.com
    Description: CC Theme 2.0
    Author: HM Design
    Author URI: http://hmdesignnh.com
    Template: esteem
    Version: 1.2.3
    */

    The css is showing on the page source, just none of the styles added to it edit the page at all. also having an array for “CC-style” loads the esteem style twice, which is confusing because i’m wording it the way the codex does.

    Thread Starter Hmathison84

    (@hmathison84)

    Oh, and the above site isn’t the one I’m working on with Esteem. This is: http://www.cctomatoes.hmdesignnh.com/

    Thread Starter Hmathison84

    (@hmathison84)

    I was able to edit things in the footer, but not in the header….

    your parent style should be enqueued as follows :
      wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

    fontesome is hosted at bootstrapcdn.com and should be :
    wp_enqueue_style('cc_fontawesome','http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

    your using the constant ESTEEM_CSS_URL where do you have it defined at.

    Thread Starter Hmathison84

    (@hmathison84)

    I was just going by Esteem’s function file which has:

    wp_enqueue_style( 'esteem_style', get_stylesheet_uri() );
    wp_enqueue_style( 'esteem-responsive', ESTEEM_CSS_URL . '/responsive.css' );
    wp_enqueue_style( 'esteem-fontawesome', get_template_directory_uri().'/fontawesome/css/font-awesome.css', array(), '3.2.1' );

    They defined the constant themselves in function.php

    define( 'ESTEEM_CSS_URL', ESTEEM_PARENT_URL . '/css' );

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Child theme issues’ is closed to new replies.