The MU forums have moved to WordPress.org

No trailing / on Home links (9 posts)

  1. ColinFilmJournal
    Member
    Posted 17 years ago #

    A user has just pointed out that the 'Home' links on our blogs don't have a trailing / - this breaks things such as links to older posts.

    Is there a simple way of adding in that missing / if it isn't there?

    For an example, see the 'Home' link here:

    http://filmjournal.net/jimdriver2/

  2. lunabyte
    Member
    Posted 17 years ago #

    That's in the theme?

    In fact Andrea and I were mentioning that a week or two ago in one of the threads, about how too many theme authors just stick <? bloginfo('url'); ?> in there, and don't put a trailing slash.

    Out of the 4 dozen or so themes I've edited recently, Maybe 5 or 6 had a trailing slash.

    Looking at your reference, that's exactly what it is. The title is the same way.

  3. ColinFilmJournal
    Member
    Posted 17 years ago #

    Nope - it appears to be coming from the wp_list_pages function (in some cases! maybe not in others). Trying to track it down now.

  4. lunabyte
    Member
    Posted 17 years ago #

    Strange, but list pages doesn't add a link to home.
    Most themes have the home link hard coded, and then run list pages. :-\

  5. lunabyte
    Member
    Posted 17 years ago #

    Yep. Just downloaded the theme.
    There's an li before wp_list_pages, and it's not slashed at the end.
    Although they echo get_settings, vice bloginfo, but still no trailing slash before the ending " in the href property.

    It's in header php, btw. While you're in there, you could tick a trailing slash on the title h1 tag too. ;)

  6. ColinFilmJournal
    Member
    Posted 17 years ago #

    Doh - ignore me. I must've been having a brain fart.

  7. lunabyte
    Member
    Posted 17 years ago #

    It's OK. I've done it myself at times. lol

  8. ColinFilmJournal
    Member
    Posted 17 years ago #

    Will have to go through all of the themes now to fix that. What a PITA :(

  9. lunabyte
    Member
    Posted 17 years ago #

    Yep. Exactly what Andrea and I were mentioning. It's a pain.

    I actually made a special dir on my local box, and put together a list of everything I add/change/remove with a theme, along with files of code snippets and images, etc.

    It comes in handy. Especially if I haven't been playing with themes lately.

About this Topic

  • Started 17 years ago by ColinFilmJournal
  • Latest reply from lunabyte