This in the <head>
is pointing to localhost
<link media="all" type="text/css" href="http://localhost/pvr/wp-content/themes/pvr/style.css?ver=3.5.1" id="twentytwelve-style-css" rel="stylesheet">
Check if that’s hardcoded directly in header.php
, or dynamically added via function as it was supposed to, and fix it.
Thread Starter
lup0z
(@lup0z)
Thank you for your reply.
In the header.php file, the stylesheets are loaded by <?php wp_head(); ?>
so it’s dynamically added.
The error came from my upload of the whole website from local to web because I mainly work on localhost with XAMPP.
How can I see how the wp_head() takes the CSS files to fix it?
Anyway, another question came to me: if the style.CSS file is loaded dynamically and the URL is wrong, how can I see the styling even in browsers?
It sounds odd.
Open your functions.php
and look for how it adds style to head.
Here is the correct way.
http://themes.trac.wordpress.org/browser/twentytwelve/1.2/functions.php#L149
Notice the use of get_stylesheet_uri()
in this line
wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
and the URL is wrong, how can I see the styling even in browsers?
Probably it’s a cached version, did you try to clear browser cache?
Thread Starter
lup0z
(@lup0z)
Paulwpxp, thank you so much for your suggestion.
I didn’t use it but it allows me to research and find out that editing the wp_option table on the DB, I can edit the website URL and it works fine!
Thank you so much!