Skip Navigation

[Resolved] post type with_front argument of rewrite should be false

This thread is resolved. Here is a description of the problem and solution.

Problem:
post type with_front argument of rewrite should be false

Solution:
Types offer the option so that you can change the permalink structure for specific post type when you edit it.

To change the default URL rewriting option with CPT and you may try to play with that. you can find that at:
=> Toolset => Post Types => Edit post type => Under section "Options" you will find option rewrite, adjust your rewrite to /blog/ and save the post type

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/post-type-with_front-argument-of-rewrite-should-be-false/#post-1104463

Relevant Documentation:

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Nicholas 6 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1103665

Hello is this implemented the right way?

I'd like to change my permalink strucutre for the blog only to include the url fragment /blog/ but this should not happen for custom post types.

When you register your post type, the with_front argument of rewrite should be false, so the permastructe is not appended to the front of your custom post type permalink.

$args = array(
// snip...
'rewrite' => array( 'with_front' => false ),
// snip...
);

register_post_type( 'your-post-type', $args );

Please help.

My custom post types are also now redirecting to /blog/...

#1104463

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Types offers the option so that you can change the permalink structure for specific post type when you edit it.

To change default URL rewriting option with CPT and you may try to play with that. you can find that at:
=> Toolset => Post Types => Edit post type => Under section "Options" you will find option rewrite, adjust your rewrite to /blog/ and save the post type

I hope this help you to resolve your issue.

#1109101

thanks