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'm having trouble creating a location based url for my site. Here is the url format I wanted:

http://domain.com/topic/united-states/new-york-ny/brooklyn/5th%20Ave%20Gym/123

The topic is the custom post type and 123 is the ID. "united-states/new-york-ny/brooklyn" is the 3 level categories. First I found a way to upload all the US states and cities into the category table: wp_terms and wp_term_taxonomy and assigned to the proper hierarchy. But there are total of 30000+ cities and states and now every time the page loads, it takes forever and a lot of time it's getting a timeout error. I'm not sure there is the right way to do it. I'm trying to ajax the category in the admin page but have no success. Please help...

mm

share|improve this question
1  
So is your problem with the meta box on post.php taking too long to load, or with generating the correct rewrite rules for your categories and taxes? Could you clarify? –  goldenapples Dec 15 '10 at 17:05

1 Answer 1

Try putting the id first.
from the codex:

For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text "page slug" as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties).

http://codex.wordpress.org/Using_Permalinks#Structure_Tags

share|improve this answer

Your Answer

 
discard

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