WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WordPress MU Sitewide Tags Pages] How to exclude a blog? (11 posts)

  1. stuve
    Member
    Posted 4 years ago #

    Hi.
    I just installed this script since i wanted a RSS feed for all of my users that got a blog on my site, We alse have a own blog on the site, and i dont to have this included within this new rssfeed, so my question is how I can exclude my blog..?
    please explain step by step since im not good at php.
    I hope it will be in admin soon.

    Thanks for a really good plugin!
    Regards
    Stefan

  2. stuve
    Member
    Posted 4 years ago #

    And its my mainblog ID=1 I want to exclude, anyone?

    function sitewide_tags_remove_posts($blog_id = 0) {
    global $wpdb;
    $tags_blog_id = get_site_option( 'tags_blog_id' );
    $max_to_del = 10;

    Can I just change here?

  3. stuve
    Member
    Posted 4 years ago #

    ....anyone? need help with this.

    I cant be the first one trying to exclude one of the blogs??

  4. plz.help.me
    Member
    Posted 4 years ago #

    MU is not the most commonly used version of WordPress.

    I see your post, but since I do not use MU just like 5/8 of all of these forum users, it may be a while before you receive a response.

    I am just here to let you know, we see and have read your message, we just can't help.

    Who knows, maybe a knight in shiny armor will come by and save the day.

  5. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    exclude one of the blogs

    Quick way - In blog which you want excluded from Sitewide-Tags-Pages, go to Dashboard > Settings > Privacy and check the option "I would like to block search engines, but allow normal visitors", Save Changes. And you're good to go.

  6. justbishop
    Member
    Posted 3 years ago #

    Anyone know how to exclude a blog from this without blocking search engines for the blog you want excluded? Like the OP, it's my main blog that I want excluded, so that's just not an option, really.

    Hoping someone will have something more to say on the issue now that 3.0 has multisite built in.

  7. justbishop
    Member
    Posted 3 years ago #

    Hmmm...ok, I noticed that the Sitewide Tags plugin creates a custom field "blogid" and populates it with the ID of the blog each post came from. I was thinking I could do this, but it gave me a weird "NOT IDENTICAL" error (used on my tags blog's index.php)

    <?php while (have_posts()) : the_post(); ?>
    
    <?php $blogid=get_post_meta($post->ID, 'blogid', true); ?>
    <?php if ( $blogid ) !== 1 : ?>
    
    ****POST DISPLAY STUFF HERE****
    
    <?php endif; ?>

    Any guidance here is greatly appreciated!!

  8. justbishop
    Member
    Posted 3 years ago #

    And here it is, courtesy of jorbin and templaedhel in #wordpress IRC (my code was actually ALMOST correct!) In this example, I'm excluding posts from blog ID 1:

    <?php while (have_posts()) : the_post(); ?>
    
    <?php $blogid=get_post_meta($post->ID, 'blogid', true); ?>
    <?php if ( $blogid != '1' ): ?>
    
    ****POST DISPLAY STUFF HERE****
    
    <?php endif; ?>
    
    <?php endwhile; ?>
  9. justbishop
    Member
    Posted 3 years ago #

    This is working pretty well for me, but I did find one hiccup. The posts from the excluded blog are still copied over to the tags blog, so they are being counted in the total number of posts. My latest sitewide posts page is supposed to display 15 posts per page, but because the excluded blog has 5 posts on it, my front page is currently only displaying 10.

    I tried adding an if statement to the SWT code, but nothing I did seemed to have an effect. The only way around this that I can see around this is to delete posts from the excluded blog from the SWT blog as needed.

    Anyone care to have a look at the SWT plugin (it's really only one file) and see if they can figure out how to add an exclude statement to keep posts from a certain blog from even being copied over to the tags blog in the first place? My guess was that something could be added somewhere in lines 179-200ish (but I could be way off).

  10. johannesk
    Member
    Posted 3 years ago #

    blogger to be able to choose whether their post appears on the front page
    i have searched high and low for a readymade solution to this without success so i can find someone generous enough to help me figure this out but i would like the blogger to be able to choose whether their post appears on the front page of the main site - if i knew how to code i could presumably just include a line or two to check whether a special tag is present eg front_page but sadly i am challenged in this department… any help appreciated

    wp 3.01 + buddypress + sitewide tags plugin

  11. I was going to suggest using a different plugin in conjunction.
    http://wordpress.org/extend/plugins/wordpress-mu-featured-posts/

    But, if you want to instruct your bloggers to tag posts they want to show up on the main page... then on the main blog just show posts from that tag.

Topic Closed

This topic has been closed to new replies.

About this Topic