Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please pastebin the child’s functions.php file.

    [moved to “fixing wordpress” as this is not an installation problem.]

    Thread Starter chrisontour84

    (@chrisontour84)

    Thanks, I have done it but it comes out as the exact same? What should happen?

    <?php
    function theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style )
        );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    
    // REMOVE EMOJI ICONS
    remove_action('wp_head', 'print_emoji_detection_script', 7);
    remove_action('wp_print_styles', 'print_emoji_styles');
    ?>
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You don’t need to explicitly enqueue the child theme’s CSS. Than happens automatically. Delete the 2nd wp_enqueue_style.

    Thread Starter chrisontour84

    (@chrisontour84)

    Thanks, I removed this part and the site still seems to work. so should be all good ??

    ` wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array( $parent_style )
    );`

    Can you spot any other JS or CSS Files on first sight that I could get rid?

    Cheers,
    Chris

    • This reply was modified 7 years, 2 months ago by chrisontour84.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘2 child theme CSS Files?’ is closed to new replies.