Forums

[resolved] Author links not CaPitALized right...grr. (9 posts)

  1. pickled
    Member
    Posted 2 years ago #

    In single.php I'm linking to my authors page like this:

    <a href="http://www.mydomain.com/wordpress/author/<?php the_author_firstname(); ?>">

    Which generates a link to this page:

    http://www.mydomain.com/wordpress/author/Mike

    BUT when the sidebar links to the same page, it links to:

    http://www.mydomain.com/wordpress/author/mike

    Any ideas how to fix that? I'd prefer they both link to lower case, but either case is ok as long as its the same.

    Thanks!

  2. DianeV
    Member
    Posted 2 years ago #

    Look in your style.css, in the sidebar area. It's possible that there's a style there that says:

    text-transform: lowercase

    Just take that part out.

  3. pickled
    Member
    Posted 2 years ago #

    thanks but, it's not the viewing of the url, its the actual url being generated - one is lower one is upper.

  4. DianeV
    Member
    Posted 2 years ago #

    Sorry I misread your post.

    That's odd. Right now, I haven't got a clue.

  5. pickled
    Member
    Posted 2 years ago #

    its something to do with how list_authors displays the name vs. the_author_firstname

    ..but I can't figure out what...grr. anyone know? or anyone know how I can do this any other way *but link to the exact same url*?

  6. Sivar
    Member
    Posted 2 years ago #

    Try changing this...
    <?php the_author_firstname(); ?>
    into...
    <?php strtolower(the_author_firstname()); ?>

    It's not exactly a nice way... more like a workaround which doesn't deal with the origin of your problem, but it should be good enough for now ;).

  7. pickled
    Member
    Posted 2 years ago #

    thanks Sivar, but that didn't work...man I was hoping that would solve it too :(

  8. Sivar
    Member
    Posted 2 years ago #

    Why didn't that work? What's the output? Maybe you can try something like...

    <?php $firstname = get_the_author_firstname();
    $firstname = strtolower($firstname); ?>

    ... and when it comes to outputting...
    `<?php echo $firstname; ?>

  9. pickled
    Member
    Posted 2 years ago #

    this works, thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic