0

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.

  • 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
1

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

http://codex.wordpress.org/Function_Reference/register_post_type#Arguments

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