Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Annika Backstrom

    (@abackstrom)

    I’ve bumped the plugin to version 0.6, adding a filter wpwhosonline_author_link to allow for customization of this link. By default, it uses get_author_posts_url().

    You can add something like this in a plugin or your theme’s functions.php:

    function mytheme_whosonline_link( $link, $user ) {
        return '<a href="/user/' . $user->user_login . '">' . esc_html( $user->display_name ) . '</a>';
    }
    add_filter( 'whosonline_author_link', 'mytheme_whosonline_link', 10, 2 );

    I’m sorry but I’m not understanding how to implement this. I’ve tried a few things and simply screwed up my site. I luckily had saved the old code and reverted back.

    Where do I go from here? Most of my users don’t have POSTS, in fact I don’t know many blogs that do. A more useful function would be the ability to view someone’s profile when clicking their name, preferably only by logged in users to protect privacy.

    Thoughts? Help?

    Thank you!

    Plugin Author Annika Backstrom

    (@abackstrom)

    I assume it’s pretty common in P2 blogs for teams, where the whole point is that any user can create a post. That aside, the idea of a “profile” is different from blog to blog, particularly if you’re using something like bbPress.

    The code sample I included above should work in your theme’s functions.php, though it’s hard to prescribe a “best” location. If you want to try adding it somewhere and reply again with your specific error, I can help you debug the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Who's Online] Directory location for user profiles???’ is closed to new replies.