Wordpress and Dynamic Programming Php
- by user1675146
I have geography pages for two types of business listings. Each page goes from state, county, city, but I need to have the same geography shared between two types of business.
My two business types are dentist and chiropractors.
I am trying to have a permalink structure like this:
enter code here xyz.com/dentist/alabama
enter code here xyz.com/dentist/alabama/polk-county/
enter code here xyz.com/chiropractors/alabama/
enter code here xyz.com/chiropractors/alabama/polk-county/
I originally was going to load the geography as pages and subpages, but with that method I cannot get the permalink separated by the type chiropractor and dentist.
So now I have created a custom post type one for chiropractor and one for dentist which give me the permalink
xyz.com/dentist and xyz.com/chiropractor.
My question is now how to handle my category geography page. I was wondering if in wordpress it is possible to create a shell page such as xyz.com/dentist/[state]/ and then through php dynamically build a page for each state? So where it shows [state] it will be replaced with the actual state such as alabama, california etc when that specific page is viewed. But the shell page is just 1 page in the database.
If so could someone give me a basic explanation on how to instruct a programmer to do this?
Thank you.