0

I'm beginning the frustrating process of migrating an existing site over to a wordpress theme and have run into trouble immediately. For some reason that I can't pinpoint, my style.css theme is not being properly placed in my site's head after enqueuing (my site has no errors, the script just doesn't appear when I inspect using dev tools). I am attempting to enqueue the file in my functions.php like so...

<?php
    function add_fitnessfifteen_styles() {
            wp_enqueue_style( 'style', get_stylesheet_uri()); //enqueue style.css
    }
    add_action( 'wp_enqueue_scripts', 'add_fitnessfifteen_styles' );
?>

I've been stuck on this seemingly simple issue for a couple of hours and figured I should turn to the experts. Somebody please make my day!

migrated from stackoverflow.com Jul 10 '16 at 21:04

This question came from our site for professional and enthusiast programmers.

1

My issue simply came as a result of not knowing that wp_head() needed to be included in header.php for the enqueued scripts to actually load on the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy