Things that should be obvious: Fixing a 404 error on Custom Post Type archive pages after converting WordPress to Multisite

Maybe it’s just hard to find because it’s such an edge case. Or is it?

Here’s the scenario: you’re converting an existing WordPress site that uses Custom Post Types (with archive pages) to Multisite.

Suddenly, when you’ve switched the site, your CPT archive pages return a 404 error.

Check this: insert /blog into the URL, like so…

Old URL

http://example.com/my-cpt-archive

New URL

http://example.com/blog/my-cpt-archive

Does it work? If so, good. If not, I can’t help you. *shrug*

Let’s just assume it does work, and continue…

You see, Multisite inserts /blog into the URL to prevent URL conflicts between the different sites. Problem is, it’s kind of stupid about it, especially if your site is not a “blog” (and despite what the core team thinks, I’m pretty sure most WordPress sites these days are not blogs). It doesn’t do anything to change page URLs, which are just as likely to conflict.

Anyway, there are two things you need to do. First, go to Settings > Permalinks. (Note that /blog has appeared in all of the permalink structures!) Switch to “Default”, save, then switch back to whatever you want it to be and save again. (Note that /blog has disappeared!)

This still isn’t going to fix your CPT archives though. For that you need to go into your functions.php file in your theme, or wherever you are registering the CPTs in your theme/plugin. In the register_post_type() function, you may have 'rewrite' defined, like this:

'rewrite' => array('slug' => 'something'),

Change it to this:

'rewrite' => array('with_front' => false, 'slug' => 'something'),

You’ll need to flush the rewrite rules by temporarily adding flush_rewrite_rules(); in the functions.php file, uploading it, loading a page, and then removing the code and re-uploading the file. Or, you can refresh the Settings > Permalinks page. (Much easier, but I haven’t tested to be 100% sure it works in this case.)

No design is good design

Design.

I’ve been noticing an interesting trend of late with blogs I find interesting: their design is minimal to non-existent. And sites that did have elaborate designs are severely scaling them back or removing them entirely.

A few examples:

Daring Fireball
Of course. This is one of the most “designed” of the sites I’m talking about today. It actually has color. Well, if you call gray a color.

43 Folders
Merlin Mann’s site may be the inverse of my own, and not just in name. It was once loaded up with “clever” design elements suitable to its “get your (creative) work life organized” philosophy: manila folders, paper clips, etc. But in its latest incarnation it’s stripped down to a bare minimum of design. The only remnant of the old look is the red color of the title at the top of the page, and outside of images and a subtle yellow highlight hover state for links, that’s the only color on the site.

rc3.org
Rafe Colburn’s site is the very definition of minimalist design. White background, black text. But clearly a lot of thought went into the choice of font (yes, even though it’s Helvetica), relative text sizes, and the sporadic use of shades of gray for things like block quotes.

Subtraction.com
Khoi Vinh’s site is masterfully designed, even though (or perhaps specifically because) it’s black-and-white-and-Helvetica-all-over. Oh, except for the slap in the face of bright orange when you mouse over a link. Pow! Bort! Mint! Snuh! (That one’s for CheckersSpeech.)

Jeffrey Zeldman Presents The Daily Report
Zeldman’s site is an explosion of designy-ness compared to the others on this list. But compared to something like Web Designer Wall it’s strikingly spartan, and deliberately retrograde. (And, in trying — unsuccessfully — to find his old post where he discussed this latest incarnation of the site, I discovered that he also covered this exact topic six months ago. Looks like I’m late to the party, as usual.)

If less is more, then none is all.