I need some help about Custom permalinks for custom post types.

I have created a custom post type called "evento" and 3 custom fields for storing date, month and year of the events.

I would like to have a permalinks structure like this:


... where the standard structure would be:


How to make this magic happen in WordPress? I do not know much about .Htaccess =(

Thanks in advance!!!

  • Have you searched the site? Resp. rewrite-rules, url-rewriting and htaccess?
    – kaiser
    Commented Jul 31, 2012 at 18:42
  • Yes, but found nothing very explanatory or that I could understand. Thank you. Commented Jul 31, 2012 at 19:12
  • 1
    Please add what you've already tried so far and show us your research effort. Thanks.
    – kaiser
    Commented Jul 31, 2012 at 19:28
  • @kaiser How could I fix my pagination issue? Commented Jul 31, 2012 at 23:05
  • Please add this as solution (you can mark it as answer in two days). Then go and open a follow up question about your pagination issue (link in there to this question). One question per question :)
    – kaiser
    Commented Jul 31, 2012 at 23:52

1 Answer 1


Problem solved!!!! =)

add_action('init', 'evento_add_rewrite_rules');
function evento_add_rewrite_rules( $wp_rewrite ){
    // Add day archive (and pagination)

    // Add month archive (and pagination)

    // Add year archive (and pagination)

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.