The MU forums have moved to WordPress.org

mysite/blog? (5 posts)

  1. sepp88
    Member
    Posted 14 years ago #

    hi there,

    i using wordpress mu. i have multiple blogs. for instance mysite.com/howdy, mysite.com/ciao, etc.

    my mainsite (index) is ofcourse mysite.com. if i visit it and click on a permalink of a blogpost the adressbar changes to mysite.com/blog/article...

    can i prevent that? i just want it to be mysite.com/article ???

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Not in the backend, no.

  3. sepp88
    Member
    Posted 14 years ago #

    okay, thank you!

  4. sepp88
    Member
    Posted 14 years ago #

    hey andrea_r,
    your help was really awesome so far. thanks for that again. anyway, i don't want to open a new topic again, since i'm a really annoying person right now in this forum.

    maybe you can have a look on that and tell me why the following case is happening.

    i found this awesome piece of code that does almost exactly what i want for my sitewide tags plugin. http://rizapn.blogsome.com/2008/10/21/sitewide-tags-plugin-modification/?cx=partner-pub-7540916937181405%3A6o3mvb-pmm6&cof=FORID%3A11&ie=ISO-8859-1&q=wordpress%20plugin%20comment&sa=Search#961

    function sitewide_tags_get_comments_num($count)
    {
      global $blog_id,$wpdb,$post;
      $tags_blog_id = get_site_option('tags_blog_id');
      if (!$tags_blog_id || $blog_id!=$tags_blog_id) return $count;
      $base = $wpdb->base_prefix;
      list($post_blog_id,$post_id) = explode('.', $post->guid);
      $r = $wpdb->get_col(\"SELECT comment_count FROM $base{$post_blog_id}_posts WHERE ID=$post_id\");
      if (is_array($r)) return $r[0];
      return $count;
    }
    add_filter('get_comments_number', 'sitewide_tags_get_comments_num');

    so the code looks like this, if i add that to my site-wide tags plugin, i get all comments collected on my mainblog as well. so if i have multiple subblogs which posts get collected on my mainblog, the comment-status is shown as well on my mainblog. that's exactly what i want. however, the only thing that know doesn't work anymore is the comments of the mainblog-posts itself??? so if i post an article right from the backend of my MAINBLOG and i write a comment, my mainblog says "no comments", even though i wrote one.

    so if i delete the code again from my sitewide tags plugin, mymainblog articles says "1 comment"...that's funny. i just want all posts to show how many comments are added.

    propably it's a simple line of code, or a simple change in the code above. maybe you know what to do. i have unfortunately no idea.

    thank you so much
    regards

  5. sepp88
    Member
    Posted 14 years ago #

    no one interested in this feature! i think that plugin (with comments) would be great for a lot of people.

    please have a look on the code. i did a few hours, however i'm not that much of a coder to edit the code to work for both cases.

    would be really really great, if you would help me! please??

About this Topic