views:

13

answers:

1

I observed that if I have a custom post type called article, the links become mysite/article/title-of-article-here. How do I make the links to have this pattern -- mysite/title-of-article-here?

+1  A: 

when you define your custom post type, you have to define a "slug." try leaving it undefined, or 'slug' => ''

philmadelphia
Even though I made 'slug' => '' the url of the article still has this pattern: mysite/article/my-article-title
Giljed Jowes
Now I know how to format the url such that the custom post type does not get prepend. And you are correct, it has to do with the slug. This is what I used for it: 'rewrite' => array('slug' => '', 'with_front' => false),
Giljed Jowes