Viewing 8 replies - 1 through 8 (of 8 total)
  • What are you using to pass css styling to your pages? In other words, what does the <style> line(s) in your template look like?

    Thread Starter kraftomatic

    (@kraftomatic)

    For the base stuff, it looks like this:

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

    But I have added other stylesheets and images that aren’t referenced that way via PHP .. and I’m not sure how to handle them.

    Thanks.

    Then the question is, are you using relative (dir/style.css) or absolute (https://localhost/dir/style.css) urls to the other stylesheets and images?

    Also, localhost as your address could be an issue if viewing the site on other computers. In that case you want to use the IP assigned by your network to the hosting PC.

    Thread Starter kraftomatic

    (@kraftomatic)

    That’s the thing. I’m using relative links, and it’s working in some cases, but not others (see first post). I’d like to make the path to archived posts (the first link) the same as the second one, so I can keep relative linking everywhere on the site.

    It shouldn’t be a big deal I’m thinking ..

    Thanks.

    If you want to avoid the https://localhost portion for your urls then you can, but you at least need to ‘start at the top’ or root of your site, so that:

    /wordpress/category/general/

    links up to the General category archive. Note the slash at the beginning, which tells the browser to start at the root and work its way down. Same goes for say css file listing:

    /wordpress/wp-content/themes/MY-THEME/alt-style.css

    You want to make sure that, where ever the browser finds itself, it always starts looking from the root for a file. Not a problem with the /?key=value default permalinking, since everything is automatically seen from the root dir, but with custom permalinks the browser doesn’t know to start there unless you explicitly tell it to.

    Thread Starter kraftomatic

    (@kraftomatic)

    Right, but why is the single post page linking one way, and the archives page linking another (ie. each has a different path to the page itself)?

    If they both were the same, then there wouldn’t be a problem. But I’ve got one working and one not working, which is the cause of my problem.

    Does that make sense?

    Thread Starter kraftomatic

    (@kraftomatic)

    Ok – I set my permalink structure back to the default setting, and everything works correctly.

    This is nice, but of course I can’t use the preferred (and cleaner) permalink structure ..

    Arg ..

    Thread Starter kraftomatic

    (@kraftomatic)

    Doh – with the permalink change, now my secondary pages don’t work. Ahhhh. ??

    Any suggestions?

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Relative Path Issues’ is closed to new replies.