• I’m cleaning house on my site, literally, and have a question about something I’ve always done, but don’t understand why.

    This:

    <?php wp_get_archives('type=monthly&format=link'); ?>

    within the <head> tags..

    I see what it outputs but dont understand the value.

    Why do we do it?

    I notice that it’s still being used in 2.2 inside kubrick also, so I’m missing something or it’s a holdover from something else that’s never gone away.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    This outputs the link tags inside the header.

    The purpose of link tags is to specify links that related to the current page. The rel attribute specifies how these links are related.

    Some examples:
    <link rel="stylesheet" href="whatever.css" type="text/css" media="screen" />
    This specifies where the stylesheet for the page is, when you’re displaying it on the screen. If the media said “print”, then it would be a stylesheet that would be used when the page was printed.

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="whatever" />
    This gives an alternate version of the page. In this case, it gives the RSS2 feed for the page.

    <link rel="pingback" href="http://example.com/blog/xmlrpc.php" />
    This gives the pingback address, for automatic pingback functionality.

    <link rel='archives' title='May 2007' href='whatever' />
    And finally, this one tells where archived versions of this page can be found.

    Some link tags are used by the browser, some are used by search engines or other tools. But *all* link tags are not meant to be directly seen by the end user, they’re a form of metadata about the webpage itself, specifying other related webpages. They are used exclusively by browsers, search engines, and other automatic tools.

    More info:
    http://wordpress.org/support/topic/115211

    Thread Starter whooami

    (@whooami)

    thanks for explaining that, I spose – though it was more than I asked about .. I understand what the other stuff is for, and I know what it outputs.

    I am, however, still in the fog, about what, specifically, those particular links are for, tool-wise.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    It is known that some search engines use that information. Google, in particular, will follow those links to find new pages to index.

    That is the only current known use that I can find anything about.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_get_archives inside head — why?’ is closed to new replies.