Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have two sites in my multisite setup - domain.tld (site A) and domain.tld/lifestyle (site B). This is my first multisite attempt.

I've made a widget that creates a custom post type "latest-news" with WP_Query and I call the widget via dynamic_sidebar() within a page template page-news.php, which matches up with my static page News. The widget is only enabled on site A.

You can see all files set up here, including my .htaccess:
https://gist.github.com/e97812f6d5c12d16039d

The posts display correctly, but when I go to view a single post I get a 404. The URL I get is

domain.tld/blog/latest-news/news-item-1 <-- Does not work

instead of

domain.tld/latest-news/news-item-1 <-- Does work

Now I know that the first site is supposed to have /blog/ in the URL, but this is the first instance where I've seen it on my site, all other pages don't seem to have it.

Does anyone know how to:

  1. remove the /blog/ portion without removing it from the Network admin, or
  2. get it to work with the /blog/ portion?

I've reset the permalinks many times, going between my custom /%category%/%postname%/ and default.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Relevant:

http://core.trac.wordpress.org/ticket/12002

/blog/ is added to prevent permalink clashes on the root site of a multisite install. For now you're going to have to resort to using the network admin and manually wading through the options table modifying it each time you regenerate rewrite rules.

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.

http://wordpress.org/support/topic/plugin-remove-blog-slug-for-resolving-multisite-url-confusion#post-1990227

share|improve this answer
    
Damn, I was hoping there was another way since everytime either myself/other developer/client update permalinks on site A, it will reset. Thanks for your answer :D –  Jarryd Crawford Oct 5 '12 at 0:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.