Support » Fixing WordPress » Grrr. Where’s this code coming from?

  • Resolved Glenn Ansley


    I need to validate my page. I have one /> left that I need to change to > but its inside wp_head and I can’t find where it’s coming from (I even used grep).

    Does anybody know where the following line of code is located? Is it in the wp core or a plugin, or what? Thanks.

    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="" />

Viewing 10 replies - 1 through 10 (of 10 total)
  • Looks like code from your theme’s header.php near the top.

    Well… yes and no.

    Here’s my header.php

    <?php wp_head(); ?>
    <title> :: Daily Devotions and Online Resources for Christian Students</title>

    and here’s the formated source

    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="" />
    [podpress js and css]
    <title> :: Daily Devotions and Online Resources for Christian Students</title>

    That is your theme’s entire header.php?

    No… I’m just demonstrating that the only thing between <head> and <title> is wp_head() in my php file.

    That means that the link I can’t find must be associated with <?php wp_head(); ?>

    … but where exactly, I can’t tell.

    Here’s a workaround… although I’d still like to know where it’s coming from if anybody happens to know. Samboll, thanks for your help.

    Well, the reason I ask is I have stuff like:

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

    and this in another:

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

    Surely you have something similar – or am I totally misunderstanding…happens a lot.

    looks like the line is from rsd_link in the wp core at wp-includes/general-template.php

    @samboll: I have those too. They’re just below the <title> tag and I knew they weren’t affecting my code.

    @charle97: Thanks, that did it… and on a dangerous side note, i just found out that many files are missing from my local backup of my wp_includes folder (which is why grep didn’t find it) so thanks… that would have been bad if I ever wiped out my live folder thinking I had a suitable backup.

    The code you speak of is generated by a function called rsd_link() in /wp-includes/general-template.php and then added to the header using an action in /wp-includes/default-filters.php (line 159 for wp 2.2.1).

    The nice thing about actions you can undo them in plugins. So make yourself a plugin file and add the following code:


    And it’s gone.

    Clever, arthurl. Thanks for that information.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Grrr. Where’s this code coming from?’ is closed to new replies.