I have wordpress running on WAMP and I am able to pull up the page with the custom template, but for some reason the css won’t load. When I veiw the page source I get an error message that says,
“<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /wordpress/css/style.css was not found on this server.</p>
</body></html>”
I don’t know how the path isn’t correct since I created the path using the “Attach Style Sheet” link button in Dreamweaver.
most likely is never pointing to the right place, because it would have to be on a page inside the same folder as the /css/ folder. If you don’t want the the full URL, you could try this:
Well, I knew that it was pointing to an absolute place with “http//:…” but I didn’t know that you have to use stylesheet directory or theme directory to refer to css using a relative path. thx
function my_styles_method() {
// Register the style like this for a theme:
wp_register_style( 'my-custom-style', get_template_directory_uri().'/css/style.css');
// enqueue the stule
wp_enqueue_style( 'my-custom-style' );
}
add_action( 'wp_enqueue_scripts', 'my_styles_method' );