Skip to:
Content
Pages
Categories
Search
Top
Bottom

Link Directly to Blogs' Author Posts

  • @nahummadrid

    Participant

    Trying to link directly to blogs author posts from the BP profile. And If you are a contributor on other different blogs on the MU network, also click directly to your author archives on blog a, b, or c.

    Currently from the blogs, the authorlinks can link back to the BP member profile, (some automatically and other themes I need the plugin) but I now want to go in reverse I guess, back to the authors posts profile from the BP member profile and make use of those author archives.

Viewing 8 replies - 1 through 8 (of 8 total)
  • @nahummadrid

    Participant

    the_author_posts_link();

    any help here? If member has posts archives page on multiple blogs on the system, how would i link from the member profile directly to the authors archive on specific blogs.

    thanks in advance

    @r-a-y

    Keymaster

    @nahummadrid – Is this thread similar to what you’re looking for?

    @nahummadrid

    Participant

    @r-a-y is similar because it seems that all links take me to the main blog author template which is cool. but I’d like to keep things as is and be selective with what links i send to the author page so instead, from my profile home, add ‘quicklinks’ to the various subblogs i’ve authored on not only the main blog.

    I was able to link to the individual blogs users are admin on, by using bp_has_blogs(‘user_id=’ . $bp->displayed_user->id == $bp->loggedin_user->id) but i guess that only works for being an admin of a blog. what if user has contributed to another blog on the system, how to link over to the author posts template for that user, is the thing :)

    @r-a-y

    Keymaster

    Gotcha… just briefly glanced the post ;)
    So you just want to list a bunch of blog links that the displayed user is a contributor to?

    Blog roles were removed in BP 1.2.3 due to performance reasons. However, you might want to look for a WPMU-specific function for this.

    Try get_blogs_of_user():
    https://codex.wordpress.org/WPMU_Functions/get_blogs_of_user

    @nahummadrid

    Participant

    @r-a-y
    You can see the way I tried get_blogs_of_user. Any suggestions to get this one to recognize all published posts regardless of membership to a subsite?

    Or get the get_blog_details(blog_id) code to work where it only shows if members has posts.

    Thanks again

    @r-a-y

    Keymaster

    I’m having a hard time understanding your use case.
    Maybe because I didn’t get much sleep last night!

    If you’re a super admin and you’re posting on someone else’s blog that you’re not a member of, your posts will probably not count (don’t quote me on that!).

    Btw, nice BP theme!

    @nahummadrid

    Participant

    @r-a-y i have a tough time understanding it myself! just crazy tinkering I guess, there is probably a simple solution….

    I think you’re right about super admin.

    I’m talking more about other members, who have posted on other network blogs. If you look at my profile sidebar, you’ll see “my videos” and “my posts” links. Each should take you to the author template page for those members on the corresponding blogs.

    My Videos ==> site.com/author/ray
    My Posts ==> site2.com/author/ray

    get_blogs_of_user method works to display only the sites members have posted on sitewide – it will however show primary site of a member regardless of posts.

    get_blog_details method forces all member profiles to display the links regardless of having posts or not. It will just link to the author page with “no posts for this author’ message as part of the author.php template.

    the issue i’m having with get_blogs_of user, I have users who make one time posts by way of a frontend form. They own that post but they don’t have a role on the blog. I think that is the reason why on some users, the links don’t display even if they do have posts.

    both methods are useful depending on how you want to use them.

    i’d like to be able to use the get_blog_details method because it lets me define what links to display. and the issue i have with that is that the links are always present, I’d like for them to only show up if the user has posts.

    make less sense now! hehe, anyway it is a very specific feature, some people may like to do something like this.

    @r-a-y

    Keymaster

    @nahummadrid – Thanks! That clears up things!
    You should preferably add the users to the blog.

    Try a plugin like this:
    https://wordpress.org/extend/plugins/wpmu-default-user-role/

    Or, customize this per blog with:
    add_user_to_blog( $key, $user_id, $value );

    https://codex.wordpress.org/WPMU_Functions/add_user_to_blog

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Link Directly to Blogs' Author Posts’ is closed to new replies.
Skip to toolbar