WordPress.org

Ready to get started?Download WordPress

Forums

Author tag error in template (12 posts)

  1. GingerNaps
    Member
    Posted 5 years ago #

    I have been having a weird error with this script for a while now.

    This error happens once I move servers. On the old server, the theme worked perfectly, but once on the new one, it gives the following error.

    The problem is the 'author' tag doesn't seem to display - now this isn't something that has always happened (which rules out that it's incorrect), it's happened on occasion when we change servers - but not on ALL sites which rules out a server problem I would assume. (Posted by: | 1 Comment / Leave a Comment) should read (Posted by: Name | 1 Comment / Leave a Comment)

    See here - http://abbie-cornish.com/ & http://www.amyadamsfan.com/

    I have looked into changing the author tag to the various ones (although it worked perfect before we moved servers) but nothing works at the moment.

    And for instance, this same loop is on http://www.meganfoxdaily.com (same server too) and works perfect.

    The same happened at http://www.michaelchall.org too but what helped there was to remove the drop down from the sidebar. But I would prefer not to go and remove it since I'm sure there's another solution to this error.

    For the record, I have tried re-upgrading several times. I am currently running on Version 2.6.2. I have the category images pluggin, wp page navi & wp grins - but all are on the current versions and I have tried disabling / re-enabling them multiple times but still no fix. Again, all worked perfectly before

    Please assist or point in me in the right general direction, thanks.

  2. MichaelH
    Member
    Posted 5 years ago #

    The template tag, the_author, echos the display_name column from the wp_users table. If you use phpMyAdmin to look at the wp_users table, what does it have in the display_name field for those authors not being displayed correctly?

  3. GingerNaps
    Member
    Posted 5 years ago #

    They are all as they should be.

    When I change the theme to the default theme on WP, the authors do display as they should. So there must be something in my current coding that is blocking it for some reason.

  4. MichaelH
    Member
    Posted 5 years ago #

    That would mean you've modified the default theme to show the author as the WordPress distribution for the wp-content/themes/default/index.php has 'the_author' bit commented out.

    You can confirm that index.php is what is being used to display those posts? See Template Hierarchy.

    You might want to paste the code at http://wordpress.pastebin.com/ and report the link and maybe someone can see the problem.

  5. GingerNaps
    Member
    Posted 5 years ago #

    Here is the code for the theme index.php:

    http://wordpress.pastebin.com/m676cdf76

  6. MichaelH
    Member
    Posted 5 years ago #

    If you change

    Posted by <a href="mailto:<?php the_author_email(); ?>"><?php the_author(); ?></a>

    to

    Posted by <?php the_author(); ?>

    what happens?

  7. GingerNaps
    Member
    Posted 5 years ago #

    Changed. It is still not showing up. :(

  8. MichaelH
    Member
    Posted 5 years ago #

    Then change
    Posted by <?php the_author(); ?>
    to
    Article posted by <?php the_author(); ?>

    that will confirm index.php is in fact being used.

  9. GingerNaps
    Member
    Posted 5 years ago #

    Done. Author name is still not showing up:

    http://www.amyadamsfan.com/

  10. MichaelH
    Member
    Posted 5 years ago #

    Sorry, I am stumped.

    Just to summarize--the_author template tag works for the Default theme, but doesn't work in your version01 theme.

    Hopefully someone else has an idea.

    P.S. nice looking site.

    If you get no satisfaction here, you might join and post to the wp-hackers emailing list. See: http://codex.wordpress.org/Mailing_Lists#Hackers

  11. GingerNaps
    Member
    Posted 5 years ago #

    Thanks for the help, MichaelH!

    We put the drop down affiliates in an iframe and after that, it worked again! Strange error but it is solved now.

  12. MichaelH
    Member
    Posted 5 years ago #

    And thank you for the follow-up, even though it rattles the brain ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags