Links to PDFs / uploaded media broken on home page / with rel attribute (1 post)

  1. cantonbecker
    Posted 5 years ago #

    I'm experiencing a maddening problem related to linking PDFs / media -- especially on the home page where WP inserts rel='attachment wp-att...' attributes. I've verified this on two separate blogs, one running 2.9.1, the other 2.9.2.


    1. click to edit home page
    2. Click to upload "Media" (e.g. PDF, word document)
    3. In Add Media box, for Link URL click "File URL"
    4. Insert into post
    5. publish

    Result: instead of linking to the actual File URL:

    WP links to the made-up page for the file:

    What's strange is that between steps 4 and 5, if I view HTML I see this:

    <a href='http://cantonbecker.com/wp-content/uploads/2008/05/recipes.doc' rel='attachment wp-att-798'>Test Word Doc</a><br />

    But then after publishing, it changes itself to:

    <a href='http://cantonbecker.com/welcome/attachment/recipes/' rel='attachment wp-att-798'>Test Word Doc</a><br />

    The only work-around I've found is to manually remove the 'rel="attachment ...' -- but that's hardly something I can ask my less technically inclined clients to figure out and remember.

    Why is WordPress messing with my links to uploaded media?

    Why does WP add those rel='' relationship attributes when I insert media items on my home page, but not on other pages?

    Thanks for any help. Pulling my hair out here.

Topic Closed

This topic has been closed to new replies.

About this Topic