ThemeShaper Forums » Thematic


link links from my subdirectory blog to site root -problem with URL

(3 posts)
  • Started 9 years ago by Bluesky
  • Latest reply from Bluesky
  • This topic is resolved
  1. Bluesky

    My blog is in a subdirectory
    My blog has a hardcoded menu to maintain the navigation on the all site. Viewers navigate inside the blog and can access the main site ( site home, about, editions etc...) from the menu.

    Today I see that Google shows Crawl Error for urls from my blog to my site root pages.

    Example of my hardcoded menu

    function add_menu() {
    { ?>
    <div id="menu">
    <ul id="cent">
    <li><a href="../../../../index.html">Home</a></li>
    <li><a href="../../../../editions.html">editions</a></li>
    <li><a href="../../../../about.html">about</a></li>
    <?php }

    The URl problem comes out when pages are linked deeper from into the blog i.e : /category/tag...

    I feel there is a big mistake in my code...
    What should I do ?

    More generally, how do I write urls that link back to the root of my site from the blog?

    Thank you,

    Posted 9 years ago #
  2. have you given any thought to using a WP3.0 menu?

    but anyway, the problem is in your crazy, RELATIVE links. basically all those ../ say go up 4 levels from where you are right now and then find the editions.html file.... which as you've noticed doesn't work when you are deeper into the blog b/c then you need to go up MORE than 4 levels. where are those files? are they in the root of your site?

    maybe you could link like this:

    <a href="">Home</a>
    Posted 9 years ago #
  3. Bluesky

    Yes, I guessed that levels were the problem. But I was not sure I could link directly to the root. I will do it this way.
    I will look the WP3 menu...I used a hardcoded menu to maintain my main site design.
    Thank you Helga !

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.