Support » Fixing WordPress » Internal linking best practice?

  • Hi all,

    I’ve done a bit of hunting on this and haven’t come up with any conclusive opinions (if there are any), but I want to know, now that we’re at 2.7, if there’s a “best practice” for internal linking?

    Many of the instructions I find tell people to go to the page they want, copy the URL, and paste it in the ahref. I’m a little surprised by this…putting that full URL to an internal page seems to violate the idea of simplicity, and I also assume would break if the link structure changed at any point.

    Soooo….am I right, and we’re still depending on plugins to simplify our internal links? Or does 2.7 support a linking function I haven’t found yet? Is there an “accepted” way to do this that is developer and SEO friendly?

    Let me know what you think, and thanks much for the help!


Viewing 4 replies - 1 through 4 (of 4 total)
  • relative links don’t work well in WP or CMS’s because the location from which they are accessed changes depending on what part of your site the page is opening from and how you have permalinks and folder layout set up. This leads to 404’s in certain places.

    One way to do it is
    <?php bloginfo('url'); ?>/my-single-page
    and <?php bloginfo('url'); ?>/category/shoes/my-single-page

    if i have WP installed in folder, i tend to use

    Ok, so using some sort of plugin to manage that is probably best?

    WP is the most dynamic CMS I’ve worked with. The others have been much more “static-y”, roll-your-own solutions.

    The main navigation links in WP are generally handled with the function called wp_list_pages() – that is what paints the nav in most themes.

    You might want to look at the code it generates to get an idea of how to do it.

    An advantage of <?php bloginfo('url') is that if you later change the URL of your WP install, change domains, or whatever, the links are not broken

    Ah, I see what you’re saying now. I will play this weekend. Thank you much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Internal linking best practice?’ is closed to new replies.