Author Bio Shortcode
[resolved] sticky username (2 posts)

  1. davidalanford
    Posted 3 years ago #

    {author_bio username='smith'] works great with a new literal name each time on the same page. However, when I use it in a php pop-up window with the username passed via a cookie, [author_bio username='jones'] (set by the cookie), persists in using 'smith' as the username despite echoing the cookie as 'jones'.

    The problem appears to be in the code as it checks first for the ID of the logged in author and then ignores the new username. I am not sufficiently familiar with the code to hack it, but it strikes me that my problem would be solve if there was no check on IDs at all.

    Can you suggest a code edit?


  2. Philip John
    Plugin Author

    Posted 2 years ago #


    Sorry for missing this when you first posted!

    The plugin only ever uses the currently logged in user if none of the user parameters (id, email, username) are present. As you've used the "username" parameter the plugin uses the get_user_id_from_string() function to grab the user ID.

    If you're using a PHP popup, does the script that creates the popup load within WordPress? Even if you're passing a cookie, that needs interpreting through WordPress before it will be usable.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Author Bio Shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic