Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 9 years ago

#21050 closed enhancement (worksforme)

EP_TAXONOMY : Rewrite endpoints don't work for custom taxonomies

Reported by: wpsmith's profile wpsmith Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords:
Focuses: Cc:


From what I can see and have tested, I simply cannot get a double custom taxonomy query to rewrite using endpoints.

If I add an endpoint:

add_rewrite_endpoint( 'taxonomy_name1', EP_NONE );
add_rewrite_endpoint( 'taxonomy_name1', EP_PERMALINKS );
add_rewrite_endpoint( 'taxonomy_name1', EP_ALL );
add_rewrite_endpoint( 'taxonomy_name1', EP_CATEGORIES );

None of these work. Instead I had to build out a new permastructure via add_permastruct().

However, EP_CATEGORIES (and thus EP_TAGS) both acted as expected. However, it would be great to be able to have EP_TAXONOMY that automatically built out the rewrite rules by adding the appropriate endpoint. Or is this too ambitious?

Change History (7)

#1 @johnbillion
12 years ago

  • Cc johnbillion added

#2 @scribu
12 years ago

  • Cc scribu added

#4 follow-up: @misterbisson
11 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

UPDATE: this is either fixed and is no longer a problem, or resulted from a misunderstanding when calling register_taxonomy().

register_taxonomy() (see ) defaults to 'ep_mask' => EP_NONE. The solution to this bug is to explicitly set the rewrite options and set 'ep_mask' => EP_TAGS or similar. rewrite.php (see ) defines a number of masks, EP_TAGS, EP_CATEGORIES, and EP_ALL seem most useful.

#5 @markoheijnen
11 years ago

  • Milestone Awaiting Review deleted

#6 in reply to: ↑ 4 @iwtravelllc
9 years ago

Thank you!

#7 @paddelboot
9 years ago

I think it should be called EP_TAXONOMIES.

Note: See TracTickets for help on using tickets.