Custom post type permalink shows blog/ in the single page
up vote
1
down vote
favorite
I have created a custom post type and it permalink shows blog/ into the single page,
For eg : www.example.com/blog/event/wine-tasting/
I need this blog/ to be removed from the single page URL and it should come like,
www.example.com/event/wine-tasting/
wordpress blogs permalinks
add a comment |
up vote
1
down vote
favorite
I have created a custom post type and it permalink shows blog/ into the single page,
For eg : www.example.com/blog/event/wine-tasting/
I need this blog/ to be removed from the single page URL and it should come like,
www.example.com/event/wine-tasting/
wordpress blogs permalinks
What CMS are you using? Or where are you doing this? Are you using .htaccess to rewrite URLs? Need a bit more clarification.
– Lloan Alas
Jul 3 '15 at 4:40
I am using wordpress CMS and the default custom post permalink generates with blog/ URL. Not using any rewrite rule in functions.php also not redirecting via .htaccess.
– Nuju Shan
Jul 3 '15 at 4:45
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have created a custom post type and it permalink shows blog/ into the single page,
For eg : www.example.com/blog/event/wine-tasting/
I need this blog/ to be removed from the single page URL and it should come like,
www.example.com/event/wine-tasting/
wordpress blogs permalinks
I have created a custom post type and it permalink shows blog/ into the single page,
For eg : www.example.com/blog/event/wine-tasting/
I need this blog/ to be removed from the single page URL and it should come like,
www.example.com/event/wine-tasting/
wordpress blogs permalinks
wordpress blogs permalinks
edited Nov 11 at 11:14
Lloan Alas
1,207623
1,207623
asked Jul 3 '15 at 4:38
Nuju Shan
62
62
What CMS are you using? Or where are you doing this? Are you using .htaccess to rewrite URLs? Need a bit more clarification.
– Lloan Alas
Jul 3 '15 at 4:40
I am using wordpress CMS and the default custom post permalink generates with blog/ URL. Not using any rewrite rule in functions.php also not redirecting via .htaccess.
– Nuju Shan
Jul 3 '15 at 4:45
add a comment |
What CMS are you using? Or where are you doing this? Are you using .htaccess to rewrite URLs? Need a bit more clarification.
– Lloan Alas
Jul 3 '15 at 4:40
I am using wordpress CMS and the default custom post permalink generates with blog/ URL. Not using any rewrite rule in functions.php also not redirecting via .htaccess.
– Nuju Shan
Jul 3 '15 at 4:45
What CMS are you using? Or where are you doing this? Are you using .htaccess to rewrite URLs? Need a bit more clarification.
– Lloan Alas
Jul 3 '15 at 4:40
What CMS are you using? Or where are you doing this? Are you using .htaccess to rewrite URLs? Need a bit more clarification.
– Lloan Alas
Jul 3 '15 at 4:40
I am using wordpress CMS and the default custom post permalink generates with blog/ URL. Not using any rewrite rule in functions.php also not redirecting via .htaccess.
– Nuju Shan
Jul 3 '15 at 4:45
I am using wordpress CMS and the default custom post permalink generates with blog/ URL. Not using any rewrite rule in functions.php also not redirecting via .htaccess.
– Nuju Shan
Jul 3 '15 at 4:45
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
I did some research and came up with this post:
When you register the custom post type, you have to specify that the
rewrite rule shouldn't be prepended with the existing URL structure.
In short, this means that this line in your register_post_type call:
'rewrite' => array('slug' => 'projects'), should turn into this:
'rewrite' => array('slug' => 'projects','with_front' => false), For
more info, check out the rewrite argument from the codex entry on
register_post_type
edit: just make sure that, after updating the code, you flush the
rewrite rules by visiting Settings > Permalinks. Otherwise you'll
still see the old links. - andreiio
Also found these 3 resources that may help you if you get stumped from another question found here - by Sophia:
WordPress.org Topic
TutsPlus
Another Question
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
I did some research and came up with this post:
When you register the custom post type, you have to specify that the
rewrite rule shouldn't be prepended with the existing URL structure.
In short, this means that this line in your register_post_type call:
'rewrite' => array('slug' => 'projects'), should turn into this:
'rewrite' => array('slug' => 'projects','with_front' => false), For
more info, check out the rewrite argument from the codex entry on
register_post_type
edit: just make sure that, after updating the code, you flush the
rewrite rules by visiting Settings > Permalinks. Otherwise you'll
still see the old links. - andreiio
Also found these 3 resources that may help you if you get stumped from another question found here - by Sophia:
WordPress.org Topic
TutsPlus
Another Question
add a comment |
up vote
2
down vote
I did some research and came up with this post:
When you register the custom post type, you have to specify that the
rewrite rule shouldn't be prepended with the existing URL structure.
In short, this means that this line in your register_post_type call:
'rewrite' => array('slug' => 'projects'), should turn into this:
'rewrite' => array('slug' => 'projects','with_front' => false), For
more info, check out the rewrite argument from the codex entry on
register_post_type
edit: just make sure that, after updating the code, you flush the
rewrite rules by visiting Settings > Permalinks. Otherwise you'll
still see the old links. - andreiio
Also found these 3 resources that may help you if you get stumped from another question found here - by Sophia:
WordPress.org Topic
TutsPlus
Another Question
add a comment |
up vote
2
down vote
up vote
2
down vote
I did some research and came up with this post:
When you register the custom post type, you have to specify that the
rewrite rule shouldn't be prepended with the existing URL structure.
In short, this means that this line in your register_post_type call:
'rewrite' => array('slug' => 'projects'), should turn into this:
'rewrite' => array('slug' => 'projects','with_front' => false), For
more info, check out the rewrite argument from the codex entry on
register_post_type
edit: just make sure that, after updating the code, you flush the
rewrite rules by visiting Settings > Permalinks. Otherwise you'll
still see the old links. - andreiio
Also found these 3 resources that may help you if you get stumped from another question found here - by Sophia:
WordPress.org Topic
TutsPlus
Another Question
I did some research and came up with this post:
When you register the custom post type, you have to specify that the
rewrite rule shouldn't be prepended with the existing URL structure.
In short, this means that this line in your register_post_type call:
'rewrite' => array('slug' => 'projects'), should turn into this:
'rewrite' => array('slug' => 'projects','with_front' => false), For
more info, check out the rewrite argument from the codex entry on
register_post_type
edit: just make sure that, after updating the code, you flush the
rewrite rules by visiting Settings > Permalinks. Otherwise you'll
still see the old links. - andreiio
Also found these 3 resources that may help you if you get stumped from another question found here - by Sophia:
WordPress.org Topic
TutsPlus
Another Question
edited May 23 '17 at 12:32
Community♦
11
11
answered Jul 3 '15 at 5:28
Lloan Alas
1,207623
1,207623
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31198573%2fcustom-post-type-permalink-shows-blog-in-the-single-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What CMS are you using? Or where are you doing this? Are you using .htaccess to rewrite URLs? Need a bit more clarification.
– Lloan Alas
Jul 3 '15 at 4:40
I am using wordpress CMS and the default custom post permalink generates with blog/ URL. Not using any rewrite rule in functions.php also not redirecting via .htaccess.
– Nuju Shan
Jul 3 '15 at 4:45