0

I have my own custom post type under:

wordpress/custom

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

wordpress/archives/custom/title

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%?

4
  • 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
    Commented Feb 4, 2011 at 12:11
  • @t31os changes nothing :( Commented Feb 4, 2011 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
    Commented Feb 4, 2011 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 Commented Feb 5, 2011 at 2:08

1 Answer 1

1

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?

5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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