I have my own custom post type under:


But when I open any item of this post type they open in:


Why there's 'archives' and how to get rid of this from my urls?

The taxonomy is registered like below:

register_taxonomy("our_frontpage_types", array("frontpage"), array("hierarchical" => true, "label" => "Categories", "singular_label" => "Category", "rewrite" => true));

And the post is registered like:

add_action('init', 'fp_register');
  • UPDATE *

Ok, now I know it was a problem with permalinks, BUT /%category%/%postname% is far from perfection. Is there something like %section%/%postname%?

  • Try setting 'with_front' => false inside the rewrite array for your post type, eg. 'rewrite' => array( 'slug' => 'your-slug', 'with_front' => false ) ... the same can be done with taxonomies to. – t31os Feb 4 '11 at 12:11
  • @t31os changes nothing :( – Wordpressor Feb 4 '11 at 23:22
  • 1
    What's your site url and home url set to? Is archive included in either, if not, that's part of your permlink structure and setting with_front to false will remove that part of the URL(so it must be one of those two things - permalink structure or home/site url). – t31os Feb 4 '11 at 23:31
  • @t31os as far I understand I should search for these in admin wp-admin / settings / general. The Wordpress and site address is the same - localhost/wordpress . And the permalink structure is /archives/%post_id% - well... Hmmm... :D – Wordpressor Feb 5 '11 at 2:08

WordPress will add archives base in the url if it thinks that the page an archive and when i had the problem it was because i named the custom post type and my custom taxonomy the same, is that the case?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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