Winner of the Best WordPress Business Website - WP Honors 2011
Since 2004
 

Forums

 

Manuals

 

Videos

 

Live Support

 

WPMU.org

Adding a sub-site at "/blog"

Elite

I'd like to have a separate blog in my network installed at the /blog address but as I'm using sub-directory install it won't allow it, does anyone know of a way around this?

I've already modified the root site and removed all 'blog' permalink structures, categories, pages and the 'blog' value which is added to the 'Banned Names' box but none of this allows a new site with the name /blog to be created - I just get this:

"The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed"

Which is quite annoying :( any ideas?

Everyday at WPMU DEV we help hundreds of WP Users. Become a member today to:

  • Download 250+ Premium Plugins and Themes
  • Get unlimited support from WordPress Experts
  • Get help with your WordPress or BuddyPress projects

Help & Support from WPMU DEV members and staff

Staff

It's hardcoded in the WP source code by the looks of things. You can override with a filter, but i'm not 100% sure how well it'll work.

If you create a php file (called something like gimmeblog.php) and put it in your mu-plugins directory. It should contain something like:

<?php

function my_gimmeblog_override( $allowed ) {
$found = array_search('blog', $allowed);

if($found !== false) unset($allowed[$found]);

return $allowed;
}

add_filter( 'subdirectory_reserved_names', 'my_gimmeblog_override', 1 );
?>

It's a bit of a hack, and could be written better but it should work.
Note: it was written in this reply box, so i haven't checked it myself.

Staff

Not sure if anyone else has any idea but I think if its in sub-site (sub domain or sub-directory?) then all blogs will be done as such.

Does it need to be a separate site, just wondering because if not you could just set up a blog page for that slug url and then have all blogs appear on there.

I noticed this plugin:

http://wordpress.org/extend/plugins/page-theme/

Specify the theme (not template, that is already taken care of by WordPress) you wish to use with each given page or blog post.

Not sure how well it works, I've never tested it but if it works as expected then it would allow you have one design for main part of your main site and then use a different theme for the blog pages thus giving it the appearance of being a separate blog.

If it doesn't work and/or you don't find a satisfactory way to achieve what you want then you could consider a custom job: http://premium.wpmudev.org/wpmu-jobs/new-project/

Hopefully this might help. :-)

<Think I might have misunderstood your request now by reading your post again and Barrys' response, sorry>

Get personal, comprehensive and timely support and assistance
from WordPress Experts

Elite

Thanks guys, I did some testing and ended up giving up as it was very hacky.

This was a decent resource: http://wordpress.stackexchange.com/questions/536/how-do-i-get-blog-on-my-wordpres-multisite

But ultimately this is too much of a core hack for me to bother with. I could have got it working but the workaround is just as good, I just need to spend more time on my user permissions and core theme.

It seems pretty easy in sub-domain mode FYI :)

We can help you out. Become a member today to:

  • Let our team help you out today and access to over 250+ Premium Plugins and Themes
  • Find out why people saying "it's like having your own developer"
  • WPMU DEV - The WordPress Experts