wp_head not injecting css (wordpress)

67 Views Asked by At

I'm trying to inject a style.css script into my front-page.php. I am able to load front-page's content by not link the style.css.

When you inspect page source, all the CSS should be there, but it simply shows the wp_head() script without injecting anything.

My functions.php, front-page.php, and style.css are all in the same root directory.

front-page.php

     <head>
        <php? 
            wp_head(); 
        ?>
    </head>

** Edited the functions.php file**

    <?php

        function load_scripts(){
            wp_enqueue_style('style', './style.css' );
        }

        add_action( 'wp_enqueue_scripts', 'load_scripts');  
    ?>

Added <php? wp_head(); ?> to the front-page.php in the head tag.

    <head>
        <php? wp_head(); ?>
    </head> 

style.css sheet

/* 
Theme Name: InfluencerSite
Text Domain: InfluencerSite
Version: 1.0
Description: Fancy stuff 
Tags: left-sidebar, responsive, fancy
Author: Shawn Esquivel
Author URI: github.com/shawnesquivel
*/


.testing {
  color: red;
}

Other Things I tried adding into the functions.php script

    wp_enqueue_style('anydescription', get_stylesheet_uri(), array(), "1.0", 'all'); 


    wp_enqueue_style('any-style-name', get_stylesheet_uri());

    wp_enqueue_style("style", get_template_directory_uri() . "./style.css");
0

There are 0 best solutions below