Support » Fixing WordPress » Word-wrap trackback URL’s

  • I have a little annoyance with my blog layout. When you check out one of my posts, the trackback URL is longer then the width of the area it occupies. In IE 6 SP1 it wraps nicely to the next line, in Mozilla Firefox 0.9 the URL continues into the right-pane, overlapping some of the content over there.
    Any ideas on how I can fix this?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Since there are no spaces in the trackback URL, FF’s behavior is probably more correct. The only CSS solution I can think of, other than making the font smaller, is to enclose it in a div with the same width as your entry column and set overflow:auto in the stylesheet. Though arguably a horizontal scrollbar is no more attractive than spilling over into the sidebar.
    A better solution might be to make your permalinks shorter by taking advantage of the ‘post slug’ field.

    Beel, nice, works well, much cleaner.

    Mark (podz)


    Support Maven

    Beel – Thanks for that ! A definite improvement 🙂


    The difficulty with turning it into a link is that people expect links to take them somewhere. You need to be confident that all your readers will know they have to copy the link target, rather than click on the link and expect that to send a trackback.



    Yep, but don’t you think if the reader knows what a trackback is and is specifically looking for one, he/she will know what to do with it? A reader who clicks on the link probably was indeed expecting to go somewhere but just had no clue where 😉 I get your point, however.



    After a bit more thought, I like the way it looks, but clicking on “Trackback” should give you a page that says “The trackback for this entry is ……………….”. Something you can cut-n-paste right off the screen.
    Clicking on trackback now just gives you the post with comments and that’s sure to be confusing.



    pull <?php trackback_url() ?> out of the href.



    To help the n00bs (of which I am one myself), I used the following code:
    “><?php _e(‘TrackBack URI’); ?> (Right click on link and click on “Copy Shortcut”)
    That will work for IE. I figure anyone using another browser probably knows what to do. 🙂
    Thanks for the code, Beel. Long trackback links were messing up my layout.

    This is what I did:
    ” title=”Trackback url (right click to copy)”>«Trackback url for this post (right click to copy) »
    Has anyone figured out why a long trackback url extends beyond its div container? It doesn’t appear to stretch anything, just span it.
    I noticed that a long title wraps, why doesn’t the trackback url?

    I’m new to WordPress. I’d like to make this change but I don’t know where to do it.

    Trackbacks link stuff occurs in wp-comments.php.


    Here’s my solution, which puts the trackback url in a text box, so that people can easily highlight and copy it.

    Put this in wp-comments.php:

    <p><?php _e("<strong>Ping URL:</strong>"); ?>&nbsp;&nbsp;&nbsp;&nbsp; <input class="field" type="text" name="pingurl" id="pingurl" value="<?php trackback_url() ?>" size="28" /></p>

    Rob, you may confuse people by using the term “Ping URL”. Pingbacks are different animals from trackbacks.

    And since this is a “shorten Trackbacks” thread, here’s my custom permalink suggestion:

    In .htaccess, add something like the following (modify based on the setup of your site)

    RewriteRule /trackback/?$ /wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]

    Then I edit my trackback link in wp-comments.php:

    <?php bloginfo("url"); ?>/trackback/<?php the_ID() ?>

    Flagged for Codex
    Kaf? Please? 🙂

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Word-wrap trackback URL’s’ is closed to new replies.