WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Sitewide Tags Pages
[resolved] SWT Causing Double Posts to Buddypress Activity Streams (4 posts)

  1. justbishop
    Member
    Posted 2 years ago #

    I have tried getting help via all of the appropriate avenues (BP forum, BP IRC chat, and even WP IRC chat), but have not been able to find a solution, and I REALLY need to get this fixed before I can move forward with my site.

    I’m running BP on a multisite WP installation along with the sitewide tags plugin to pull blog posts from child sites into the main site, essentially making a copy of all child site posts on the main site as if they’d been written there originally. Since blog owners’ posts to their child site blogs also post to their main site profiles, this is causing double posts to the activity stream. You can see an example here (one post will say “on the site ________” and the double will say “on the site RiotCart.com”):

    http://www.riotcart.com/activity

    I need to eliminate the doubles that say “on the site RiotCart.com”, which is my main blog, ID# 1. I’m assuming this is done on activity/activity-loop.php, somehow using bp_has_activities(), but am fuzzy on where to go from there.

    I have read the doc for the activity loop, and I’ve gotten as far as the following (which I assume is way off, but it’s a starting point, at least). Where in my activity/activity-loop.php would it go? I’m assuming that this will exclude EVERYTHING about blog #1, so how do I specify to allow everything from ID# 1 EXCEPT blog posts?

    <?php if ( bp_has_activities( '!primary_id=1') ) : ?>

    It was suggested that I use the Block Activity Stream Types plugin to solve the problem, but doing so completely screws up the functionality of my "featured" post area on the index page of my site, causing it to not even load past the "featured" heading when it's trying to load a post that was designated as "featured" after the block types plugin was activated. Not sure why that happens, because the posts are being pulled by a custom post query on my index page template, and the posts that SWT pulls into my main site (the tags blog) are still there...I have no idea why messing with the BP activity stream has anything to do with THAT interaction.

    I'm just at my wit's end here, and am pleading for someone to help me figure this out :(

    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    I also posted this link in your thread at the BuddyPress.org support forums: http://wpmututorials.com/plugins/turn-off-sitewide-tags-on-special-blogs/

  3. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    You can create a similar one that you activate on your tags blog:

    remove_action( 'save_post', 'bp_blogs_record_post', 10, 2 );

  4. justbishop
    Member
    Posted 2 years ago #

    Oops, forgot to come back here and post that I'd fixed the issue! Ended up just using the block activity stream types plugin, and solved the issue of that messing with my featured post area by removing the bp_before_blog_post and bp_after_blog_post codes from around the query that displays those. Weird that that was somehow making my query depend on the activity stream entries!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic