wp_head doesn’t work
-
Hi guys. I’m newbie in WP. I successfully installed new 4.9 WP on my server. And now I’m looking for how to make new theme. So I created a new folder in wp_content/, made index.php; style.css; footer.php and header.php. Wrote description in style.css and activeted my new theme. It’s all good and cleare. Now I want to add custom css file. So I have that file here css/whatever.css in my theme folder. I wrote the simplest index-header-footer-css. All works. But when I add wp_head to header.php site displays blank page. What am I doing wrong? Help please.
index.php
<?php get_header(); ?> <h1>Hi everybody</h1> <?php get_footer(); ?>
header.php
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Title of the document</title> <?php wp_head(); ?> </head> <body>
footer.php
<footer> <p>That's the footer</p> </footer> </body> </html>
function.php
<?php function gogoflow_scripts() { wp_enqueue_style( 'customstyle', get_template_direcrory_uri() . '/css/whatever.css', array(), '1.0.0', 'all'); } add_action( 'wp_enqueue_scripts', 'gogoflow_scripts');
whatever.css
html, body { margin: 0; color: #333; background: #eee; }
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_head doesn’t work’ is closed to new replies.