WordPress.org

Support

Support » Themes and Templates » Author tag error in template

Author tag error in template

  • GingerNaps

    @gingernaps

    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.

Viewing 11 replies - 1 through 11 (of 11 total)
  • MichaelH

    @michaelh

    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?

    GingerNaps

    @gingernaps

    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.

    MichaelH

    @michaelh

    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.

    GingerNaps

    @gingernaps

    Here is the code for the theme index.php:

    http://wordpress.pastebin.com/m676cdf76

    MichaelH

    @michaelh

    If you change

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

    to

    Posted by <?php the_author(); ?>

    what happens?

    GingerNaps

    @gingernaps

    Changed. It is still not showing up. 🙁

    MichaelH

    @michaelh

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

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

    GingerNaps

    @gingernaps

    Done. Author name is still not showing up:

    http://www.amyadamsfan.com/

    MichaelH

    @michaelh

    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

    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.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Author tag error in template’ is closed to new replies.