• Resolved miromiro

    (@miromiro)


    I installed WP on my server (no problem, worked a treat) and then downloaded XAMPP to install a local version to work on my home machine (XP).

    After some blundering around it seemed to work, however, it only loads style.css from the remote server – so if I edit my local style sheet, I don’t see any changes on localhost until I upload it to the server. Worse, if I am offline, the site displays on localhost unstyled.

    I have a basic grasp of what is going wrong, but can’t find a fix. I would appreciate any help offered.

Viewing 8 replies - 1 through 8 (of 8 total)
  • If it only loads style.css from the remote server, I believe this must mean that your template is still calling your stylesheet from your remote server. I can only presume that perhaps your stylesheet location has been given an absolute URL.

    To remedy this, modify your Header template so that your stylesheet is called from your localhost. Here’s the relevant line of code:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    Normally <?php bloginfo('stylesheet_url'); ?> will automatically give you your localhost stylesheet. But if even this fails, try giving it an absolute URL to your localhost stylesheet, e.g. http://local.yourwordpressinstall.com/wp-content/themes/yourtheme/style.css.

    Thread Starter miromiro

    (@miromiro)

    Thanks for the reply, ZM.

    Partial fix: it loads style.css but not navigation.css. I tired an absolute url (local) there but no joy.

    Or is it just a case of needing to run two versions on my local machine – one for dev and one to synchronize with the remote server?

    Cheers

    is your navigation.css in a subfolder?

    Should look like so:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/navigation.css" type="text/css" media="screen" />

    If it’s not in a subdirectory, but the same level as the style.css, then remove that “/css” I put in there.

    Thread Starter miromiro

    (@miromiro)

    Thanks doodlebee,

    No, it is all pointing where it should: /navigation.css”

    Cheers,

    I’m curious: what URI’s are specified at Options -> General?

    Thread Starter miromiro

    (@miromiro)

    Hi Handy,

    absolute uri’s: http://www.domain.org.nz/blog/

    Does that help? Or do I have to have a seperate instance of WP installed locally with local uris?

    Cheers,

    I run local copies of all my own and client blogs using xampp. I’ve found you have to have the local uris or it borks.

    I also run local databases; I’ve not tried accessing the online databases…. hmmm. Wonder if that would work…. hmmm. Might have to try it….

    Thread Starter miromiro

    (@miromiro)

    Thanks vkaryl,

    Yeah, it was a conclusion that was becoming more and more evident to me (I guess I was just in denial about it).

    Cheers,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Local host not calling local css’ is closed to new replies.