Me @ Twitter : Live Feed

Twitter Updates

    follow me on Twitter

    Fix Bad Author Hyperlink in WordPress For OpenID Users

    I run multiple WordPress sites and I like OpenID so I tend to suggest users register with OpenIDs.  I ran into an issue with author hyperlinks in WordPress when the author is an OpenID user.  The problem is the default URL for the author is their “website” from their user profile.  With OpenID users, this is their OpenID which results (on my site anyway) in a 404 error.  By making the modification below it causes WordPress to always use the “?author=1″  convention as the author’s hyperlink.  Not ideal, but it works.

    line: 413 in file /wp-includes/author-template-php:

    if ( empty($link) ) {

    change to

    if ( true ) {
    Share

    5 comments to Fix Bad Author Hyperlink in WordPress For OpenID Users

    • jefferai

      As it turns out, this is now a blocker for some people I work with moving to our WordPress install instead of what they’re currently using. They like the category and tag feeds but losing the author feeds is a no-go. :-(

      I’ve tried sending email (and xmpp) to the plugin’s author, but haven’t heard back — so if you can manage to figure it out, that’d be fantastic.

      • It looks like WordPress has a method to use the author ID in a feed url built in. Apparently it depends on how the various templates call the function to generate the feed url as to how the feed url will be built. For example, using the author id, try this as a parameter on your url: ?feed=rss&author=11 and it should generate an RSS feed for that author. Since it seems to depend on the template there doesn’t appear to be a WordPress code fix for the problem you are seeing.

        Let me know if it works.

    • I haven’t looked at that code yet…let me see if I can figure out a workaround for the author feeds.

    • jefferai

      This actually has a problem — author feeds don’t work. E.g. http://myblog/?author=11/feed is not valid, and simply returns the author page. Do you know how to make this work? Thanks!

    • jefferai

      I just ran into this — thanks a bunch!

    Leave a Reply

      

      

      

    You can use these HTML tags

    <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Spam protection by WP Captcha-Free