• I’ve been searching and trying but for some reason I can’t get my style sheet to work.

    It’s an active theme but every time I try to make a change nothing changes on my site.

    /*
     Theme Name:   Twenty Eleven Child
     Theme URI:http://sevenoaksoralsurgery.com/folder/folder/folder/folder/folder/twentyeleven-child/
     Description:  Twenty Eleven Child Theme
     Template:     twentyEleven
     Version:      1.0.0
     Text Domain:  twenty-eleven-child
    */
    
    body, input, textarea {
    	color: #00ffff;
    	font: 3px "Roboto Slab", serif;
    	font-weight: 300;
    	line-height: 1.625;
    }

    I’m just trying to get something to change in my twentyeleven theme.

    My function page contains this. For the link.

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }

    Please help. Thank you.

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    It appears you are only loading the parent theme stylesheet.

    Try adding the following code inside of your wp_enqueue_scripts callback:

    wp_enqueue_style( 'child', get_stylesheet_uri() );
    Thread Starter jmabluez79

    (@jmabluez79)

    Thanks for responding Jose. I still can’t seem to get it working. Is this how the new function page should look?

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child', get_stylesheet_uri() );
    }
    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Correct.

    Thread Starter jmabluez79

    (@jmabluez79)

    Thanks Jose!

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

The topic ‘Child Theme not linking’ is closed to new replies.