WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My question is related to this one. I would like my post permalinks to be prefixed by /blog/, but I don't want this prefix to be applied to my custom post type portfolio. In other words, I expect post links to use /blog/ and portfolio links to use /portfolio/. This is why I set set_front to false for this post type and set my permalink structure to /blog/%postname%/.

This almost works, except that a wp_list_categories call in my page header prints broken links. My skill taxonomy links have the form /portfolio/[SKILLNAME], but this function is outputting /blog/portfolio/[SKILLNAME], which leads to a 404 page.

Any thoughts on what might be going on here? I already tried clicking Save changes on the Permalinks settings page to force a flush of the rewrite rules.

share|improve this question

closed as too localized by s_ha_dum, toscho Apr 28 '13 at 19:40

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Can you post your code? Do you mean with_front instead of set_front? – s_ha_dum Apr 28 '13 at 17:17
Aw shoot... I'm an idiot and I've been staring at code for too long. Thanks :) Should I delete this question? – Pieter Apr 28 '13 at 18:32
I answered the question to keep things neat. Voting to close as "too localized" – s_ha_dum Apr 28 '13 at 19:05
up vote 1 down vote accepted

The parameter you are using is wrong. There is no set_front parameter when you register a Custom Post Type. The appropriate parameter is with_front.

'with_front' => bool Should the permastruct be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true


share|improve this answer

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