WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] plugin: Remove Blog Slug for resolving multisite url confusion? (36 posts)

  1. daitya
    Member
    Posted 3 years ago #

    Maybe if I'm lucky, Andrea will see this and help me out with some advice...?

    I'm looking for the Remove Blog Slug plugin. Ipstenu mentioned that Andrea and Ron are the plugin's authors, but no sign of it over at wpmututorials.com.

    Actually, I'm experiencing a conflict between the main site category urls and the sub site category urls. Refer to this post. Now I'm wondering whether using a plugin to remove the '/blog/' from the url might resolve the confusion?

    I've been looking all over for the solution, but - tell the truth - I'm not really even sure what is causing the problem.

    Ipstenu's write-up about switching to Multisite breaking links points to the plugin as one possible fix.

    BTW, has this issue of the '/blog/' slug in url been addressed in WP 3.1?

  2. Yeah, you can't do it anymore. :/ Basically that was a bug, and you can't remove the blog slug right now.

  3. ECSDave
    Member
    Posted 3 years ago #

    Okay, I see that /blog/ is stuck in there...

    I just changed over to a mu/multisite setup...

    Can I change it to another term, other than blog?

    Thanks!

    (3.1 version)

  4. Not right now, no, Dave :(

  5. ECSDave
    Member
    Posted 3 years ago #

    Oh darn!

    ;=(...

  6. We took ours down & didn't put ti back up. There ARE others.

    http://buddydev.com/plugins/remove-blog-slug-plugin/

  7. daitya
    Member
    Posted 3 years ago #

    Thank you, Ipstenu and Andrea! I've downloaded the plugin, activated it and it has fixed the problem. Now the categories menu item is working globally on my small network!

    At least temporarily... can't wait to see what happens when I upgrade to v 3.1. :)

  8. Do they work post 3.1 though?

    I haven't bothered to try.

  9. ECSDave
    Member
    Posted 3 years ago #

    Well, I don't know how, but I did it...

    I used the http://buddydev.com/http//buddydev.com/public-download/cc-remove-blog-slug-v-1.1.zip plugin, and as best I can remember, it did NOT appear to work.

    Ah, the plot thickens...

    Of course, I followed some instructions, somewhere, that said to copy your custom permalink structure from out of the little box, and save it somewhere, then select the default option, and save. This with the above plugin installed (as super user/network admin) and activated.

    The next step said to then put your custom permalink code back into the little box, and save again. I did that.

    Tested the post links, still had /blog in them, and when deleting that string, got the "404"...

    Okay, so I figured why keep this plugin, if it don't work, right? So I go back to network admin, deactivate, then delete.

    So, now I'm thinking I don't want /blog in my url, so I'm guessing "pages" are the way to go (and some say that is so, but I'm not going to debate that here). So I go and copy paste the post, to a page. All is well...

    Later on, after dinner, I come back to the blog, as the post/page wasn't finished. Amongst doing other things, and still having the "Hello World" post in the list, I click on the view link (I had modified the post, instead of deleting and creating a new one), and voila, the /blog seems to have disappeared, and trust me, it had been there before!

    So, I ADD the /blog part back into the url, and... it gets stripped on hitting the enter key, and the post loads. Wow!

    I'm guessing I just fixed (or broke) something, and eliminated the /blog from my root multisite (3.1) blog... ;)

    And, on further testing, the /blog is NOT in newly created posts...

    Things that make you go Hmmmm...

  10. I loaded it up and tested it too. Then I spent an hour kicking it and making my own version.

    Problems

    1) YES it changes the pages, but not the internal linking. So your blog post permalink is wrong. Great.

    You should be able to filter the_permalink() though....

    2) The stupid permalinks option page HARD CODED a check to put /blog/ in the display (and lock it from editing). see wp-admin/options-permalink.php - So even if you DO get #1 fixed, it LOOKS wrong. Also I'm not sure it won't change it back if you re-save. Interesting.

  11. ECSDave
    Member
    Posted 3 years ago #

    Yes, indeed, on the permalinks option page, it STILL shows up (outside of the little box), but... As far as I can tell, it is NOT in the permalink at the top of a new posts editing page, nor is it there when the post (not page) is saved, and is live...

    I may have left out a step, in my comment above, or I may not have... I really don't remember. I tried to comment all the steps as best I could recall. All I know is that "for now", the /blog is not on my new (or old) posts any more, and if you put /blog into the url yourself, it gets stripped, and there's no 404. ;)

  12. In THEORY you might be able to tweak it in the database, but I'm still poking around as to why the devs did what they did.

  13. ECSDave
    Member
    Posted 3 years ago #

    Oh, and I probably should have, but didn't (I am using post_id) replace /blog with something else in my permalinks...

  14. ECSDave
    Member
    Posted 3 years ago #

    I did poke around in the db (prior to trying the plugin) but kept getting the 404... ;)

    Also, THANK YOU for being active on this... ;D

  15. I have a gut feeling it's hard coded in there somewhere :/

  16. ECSDave
    Member
    Posted 3 years ago #

    Well, if you DO find it, and can "fix" it, I'm certain that multisite users the world over will applaud your efforts!

    .......

    Bravo!!
    
            ,,,
           !!!!\\\\
         ''!_  ||||
          ' \'-'''|
            '\   /
             )\  \
      ejm   /  \  \
                \

    .......

  17. Swedie
    Member
    Posted 3 years ago #

    Indeed this must be fixed to either optional or atleast able to change it from /blog/ to something else.

    Oddly, it's only the main site that has this. All my network sites don't have /blog preceding their posts.

  18. Jeff Sebring
    Member
    Posted 3 years ago #

    You can remove the blog slug completely.

    Go into the primary site options in the network admin, and set your permalinks without blog included, to something like /%postname%/. Go back to the permalinks settings in your site's dashboard, you should notice that /blog is removed from the permalinks. Set them to your desired structure again and save.

    This should remove the blog slug from your URLs.

  19. @Jeff have you tried it in 3.1?

    You could do this in 3.0, but it was technically a bug that allowed you to do so. in 3.1 this behavior was changed.

  20. Jeff Sebring
    Member
    Posted 3 years ago #

    @Andrea_r Yes, it still works. Here is a post I just made on my development install, which is in a subdirectory of the main blog, using its wp-content directory and database, but a separate install. /optic/ is the root of this multisite installation.

    http://jeffsebring.com/optic/no-blog-slug-wordpress-3-1-multisite-example-post/

  21. I haven;t had the chance to tinker, but Ipstenu was having issues. that's why I asked.

  22. *blink* *goes to try this*

    ETA Okay this DOES NOT work on my Site with BuddyPress. Interesting.

  23. Jeff Sebring
    Member
    Posted 3 years ago #

    I am not using BuddyPress, just to be clear. I've done this on a number of sites, with all beta versions of 3.1 as well.

  24. Okay, it DOES change it, but it DOES NOT change the wp-admin/options-permalink.php part.

    THAT has /blog/ hard coded in :/ AND if you save permalinks there, it resets to /blog/<whatever>.

  25. ECSDave
    Member
    Posted 3 years ago #

    Ah, did I not mention that part, in my post above - Remove /blog in url for root blog in wordpress 3.1 multisite installation... ;=)

    Oops!

    Let me mention it here then...

    Once you've found that the /blog is removed from your posts "live" permalink structure, do NOT go back in and change/save it again. It's already "fixed".

  26. Right :) Which means IF you do want to change your permalinks, you have to ALWAYS do it from Network Settings.

    This is not... tenable or sustainable for CLIENT sites, alas.

  27. Jeff Sebring
    Member
    Posted 3 years ago #

    I'm not sure how this would be bad for a client. I don't generally advise clients that it is wise to change permalinks, rather the opposite.

  28. ECSDave
    Member
    Posted 3 years ago #

    True that, Ipstenu.

    Ipstenu said:

    Right :) Which means IF you do want to change your permalinks, you have to ALWAYS do it from Network Settings.

    This is not... tenable or sustainable for CLIENT sites, alas.

    Users the world over are hoping you'll do this... ;=)

  29. I'm not sure how this would be bad for a client. I don't generally advise clients that it is wise to change permalinks, rather the opposite.

    It's bad because they can change it and thusly break their links.

    Of course they shouldn't change their permalinks! Have you ever met a client who always does exactly what they should, all the time? :D

  30. And if for some reason a plugin or upgrade flushes their rewrite rules and they need to resave their permalinks to fix it... this'll bork it.

Topic Closed

This topic has been closed to new replies.

About this Topic