WordPress.org

Ready to get started?Download WordPress

Forums

how to remove category base /blog (16 posts)

  1. rueschhoff
    Member
    Posted 3 years ago #

    I just set up a multi-network site and the category base /blog is showing up - is there anyway to remove this - it really makes for an ugly url
    http://firsttuesdayusa.com/blog/carol-pilkington/

  2. cbmc
    Member
    Posted 3 years ago #

    Super Admin => Sites => Edit => Permalink Structure => replace "blog" with something else

  3. rueschhoff
    Member
    Posted 3 years ago #

    I don't see that option under the super admin panel but it is in the normal dashboard part under permalinks -- but the whole thing is I really don't want it there at all - and if you want to use category/post then it shows yoururl.com/blog/category/post

  4. keesiemeijer
    moderator
    Posted 3 years ago #

    If you hover over your sites "Edit" appears.

  5. gnormids
    Member
    Posted 3 years ago #

    Same problem here. Not only that, after I changed my "blog" as suggested, the link doesn't work and the page doesn't exist.

  6. interested
    Member
    Posted 3 years ago #

    When you've set up your network, you have pasted a code within your .htaccess file.

    There within the rewrite rules the ones provided by the application should have been:

    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . /blog/index.php [L]

    You should note the /blog/ on the second and last lines of the code. Now depending on what you've updated your links to, you should either remove the blog completely and leave the code as:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    or replace the 'blog' text with the new "category" name that you've applied within the settings.

  7. the /blog/ permalink gets stuffed in on purpose only on subfolder installs.

    you can use a plugin to remove it BUT it will not do any checks for collisions between blogs names and page urls.

  8. Hubert Nguyen
    Member
    Posted 3 years ago #

    Andrea, which plugin would you use to remove /blog/?

  9. tinus2
    Member
    Posted 3 years ago #

    this is the plugin i am using:

    http://wordpress.org/extend/plugins/wp-no-category-base/

    however, andrea might have a better suggestion ;)

  10. bobdebilder
    Member
    Posted 3 years ago #

    this is maybe the plugin Andrea is suggesting

    http://wpmututorials.com/remove-blog/

    she has mentioned - We will be updating this plugin for WordPress 3.0

    you get the plugin packaged with an eBook which is $8

    If this plugin works effectively then I have no problem paying as Andrea is one of the most helpful WP persons out there

  11. There's a few more kicking around too. A quick google shows them all.

  12. Hubert Nguyen
    Member
    Posted 3 years ago #

    bobdebilder, thanks for the pointer. Andrea, you are way too modest. In WP 3.0, I can actually edit the settings in Super Admin>Sites>Edit to remove the /blog part of the URL, but any edit of Settings>Permalink will nullify the previous edit. Just a FYI for those who want to try.

  13. tomgf
    Member
    Posted 3 years ago #

    Thanks for the info, Hubert.

    I had developed a plugin myself (back then when WP 2.x was the top version), interacting with $wp_rewrite.

    Unfortunately, the plugin doesn't work that well with the latest versions – my fault basically – particulary it has problems flushing the rules…

    Knowing that you can just edit Super Admin > Sites > Edit to handle this was a good thing.

  14. HerbKilby
    Member
    Posted 3 years ago #

    the /blog/ permalink gets stuffed in on purpose only on subfolder installs.

    you can use a plugin to remove it BUT it will not do any checks for collisions between blogs names and page urls.

    Okay, I'm confused. "blog" is freaking ugly as crap. Changing permalinks has no effect. You can't even rename it to something else. It's locked in the code. Explain the logic to me again? We are smart enough to set up a network, but we are tooooooooo stupid to watch out for naming collisions? Give me a break. And the solution is... go find a plug in? What kinda crap is that?

  15. but we are tooooooooo stupid to watch out for naming collisions?

    Remember the use case for multsite is a public blog network.

    So yeah, a lot of users who would be signing up really are too stupid to check and see if a page on the main site is the same as the blog name they wanna make.

  16. HerbKilby
    Member
    Posted 3 years ago #

    Ok, got it working without /blog/ being forced in there. It was important that the slug also serve as a kinda breadcrumb on the site I'm building.

Topic Closed

This topic has been closed to new replies.

About this Topic