Support » Plugins and Hacks » Author Bio Shortcode » [Resolved] Cannot select author using ID

[Resolved] Cannot select author using ID

  • Hi,
    I know that we all say this too often, but this is another great, free plug-in that delivers great functionality, in a very simple package.

    I’m using the plug-in to display a couple of featured authors on our homepage, and when I select an author using the syntax for either username, or email address, it works perfectly well. However, when I try to select the very same author by his/her id value, the selection is ignored, and the default value overrides the selection by inserting the BIO for the page author.

    I’ve reviewed and compared the syntax a number of times, and I am pretty sure I’ve got it right. In fact, the syntax is so simple, it’s hard to imagine that I’ve got it wrong, but here’s what I’ve inserted…

    [author_bio name=”yes” name_link=”yes” id=”123″]

    If I replace the value of 123 with any other value, the page is still loaded with the bio of the page owner, not of the author that I’ve selected.

    As mentioned, on the same page, I’ve inserted the short code twice, and the second shortcode is pointing to a different author, using the username syntax, and it works perfectly, as noted above.

    Can you help?


Viewing 2 replies - 1 through 2 (of 2 total)
  • After a week of waiting for a response, I had one of my Web Developers look into the problem, and it seems that it was a simple fix. This forum does not seem to allow me to post a new version of the PHP file as an attachment, so I’ll just post the fix…

    Prior to making the change, line 59 of author-bio-shortcode.php looked like this…
    if (!empty($id) && is_int($id)){

    After making the change, line 59 of author-bio-shortcode.php looked like this…
    if (!empty($id) || is_int($id)){

    I’ve tested this in my system, which is running at WPEngine.com, on WP 3.5.1, and it works perfectly. The other two methods for selecting author still work, but now you can also select an author by their ID.

    I’m hopeful that the author will comment on our fix, and include it in the next version of the Plug-in.

    Thanks for this very useful contribution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Cannot select author using ID’ is closed to new replies.
Skip to toolbar