My CSS is not enqueuing
-
My CSS not feed into my page when I used the enqueu method in the function.php. My styles do not even appear. This is my code below for the function.php:
<?php function load_stylesheets(){ wp_register_style('sj', get_template_directory_uri() . "/sj.css", array(), 1.0, 'all'); wp_enqueue_style('sj'); } add_action('wp_enqueue_scripts', 'load_stylesheets'); ?>
This is the page source of my custom template:
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='dns-prefetch' href='//s.w.org' /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.0\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.0\/svg\/","svgExt":".svg","source":{"concatemoji":"http:\/\/127.0.0.1:81\/wordpress\/wp-includes\/js\/wp-emoji-release.min.js?ver=5.5.3"}}; !function(e,a,t){var r,n,o,i,p=a.createElement("canvas"),s=p.getContext&&p.getContext("2d");function c(e,t){var a=String.fromCharCode;s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,e),0,0);var r=p.toDataURL();return s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,t),0,0),r===p.toDataURL()}function l(e){if(!s||!s.fillText)return!1;switch(s.textBaseline="top",s.font="600 32px Arial",e){case"flag":return!c([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])&&(!c([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!c([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]));case"emoji":return!c([55357,56424,8205,55356,57212],[55357,56424,8203,55356,57212])}return!1}function d(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(i=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},o=0;o<i.length;o++)t.supports[i[o]]=l(i[o]),t.supports.everything=t.supports.everything&&t.supports[i[o]],"flag"!==i[o]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[i[o]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(r=t.source||{}).concatemoji?d(r.concatemoji):r.wpemoji&&r.twemoji&&(d(r.twemoji),d(r.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='dashicons-css' href='https://127.0.0.1:81/wordpress/wp-includes/css/dashicons.min.css?ver=5.5.3' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://127.0.0.1:81/wordpress/wp-includes/css/admin-bar.min.css?ver=5.5.3' type='text/css' media='all' /> <link rel='stylesheet' id='wp-block-library-css' href='https://127.0.0.1:81/wordpress/wp-includes/css/dist/block-library/style.min.css?ver=5.5.3' type='text/css' media='all' /> <link rel='stylesheet' id='wp-mail-smtp-admin-bar-css' href='https://127.0.0.1:81/wordpress/wp-content/plugins/wp-mail-smtp/assets/css/admin-bar.min.css?ver=2.5.1' type='text/css' media='all' /> <link rel="https://api.w.org/" href="https://127.0.0.1:81/wordpress/wp-json/" /><link rel="alternate" type="application/json" href="https://127.0.0.1:81/wordpress/wp-json/wp/v2/pages/12" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://127.0.0.1:81/wordpress/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://127.0.0.1:81/wordpress/wp-includes/wlwmanifest.xml" /> <meta name="generator" content="WordPress 5.5.3" /> <link rel="canonical" href="https://127.0.0.1:81/wordpress/" /> <link rel='shortlink' href='https://127.0.0.1:81/wordpress/' /> <link rel="alternate" type="application/json+oembed" href="https://127.0.0.1:81/wordpress/wp-json/oembed/1.0/embed?url=http%3A%2F%2F127.0.0.1%3A81%2Fwordpress%2F" /> <link rel="alternate" type="text/xml+oembed" href="https://127.0.0.1:81/wordpress/wp-json/oembed/1.0/embed?url=http%3A%2F%2F127.0.0.1%3A81%2Fwordpress%2F&format=xml" /> <style type="text/css" media="print">#wpadminbar { display:none; }</style> <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> </head> <body> <div class="parallax1"> <video autoplay muted loop id="Welcome"> <source src="./HelloJon.mp4" type="video/mp4"> </video> </div> <section> <h1>Write something here</h1> <div class="two-col"> </div> </section> <div class="parallax2"> <div class="heading-sm"> </div> </div> <section class="dark"> <h2></h2> <p></p> </section> <div class="parallax3"> </div> <section class="dark"> <h3></h3> <div class="two-col"> </div> </section> <div class="parallax4"> </div> <footer> <p>Developer: Jonathan Smith</p> </footer>
I tried the long path name and it still will not take my css. Please Help
The page I need help with: [log in to see the link]
- The topic ‘My CSS is not enqueuing’ is closed to new replies.