Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
    
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
    
Uff, done! :D Thank you a lot! –  Wordpressor Feb 5 '11 at 2:18

1 Answer 1

up vote 1 down vote accepted

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?

share|improve this answer
    
I've added taxonomy to the first post. –  Wordpressor Feb 3 '11 at 23:40
    
add your register post type code –  Bainternet Feb 4 '11 at 0:16
    
also what do you see as url in the edit post type page near the slug field? –  Bainternet Feb 4 '11 at 0:50
    
@בניית אתרים i see 'localhost/wordpress/archives/frontpage/lifelong-support'; there. –  Wordpressor Feb 4 '11 at 23:22
    
whats your permalink structure? and home/site url? –  Bainternet Feb 5 '11 at 1:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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