Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Need Ideas On Directory Structure For creating Business Profiles WordPress

I'm a bit stuck on how to approach this, I feel I'm looking in the right direction using custom post types and taxonomies, but I can't get the pieces fit together as needed.

This is how things should work and be displayed:

1: WordPress admin creates a new Business Profile, clicks on a link in the left sidebar that would read add new Business Profile.
2: When adding a new business profile, allow the option to choose a business type and business location, locations will be City Names
3: Business profile information can then be seen on the following type of url: dm.com/lawyer/city-name
4: The URL dm.com/lawyer page would then display a link to the city name page (Profile Page), when multiple businesses are added as described in the previous steps, multiple city names links will display.

Notes: Only one business profile will be shown on a url like this dm.com/lawyer/city-name
When adding a business profile (Step 2) then there will also be options available to add custom information, these fields will be added to the post editor using the Advanced Custom Fields plugin.

So the city name location, would essentially function as a business profile page.

And the business type page as an index for profile pages.

Answers (2)

2014-07-06

Remy answers:

Locations can be a custom post type, and business types a taxonomy. You will have to use a plugin to change the URL structure to fit what you want.

2014-07-06

timDesain Nanang answers:

business profile = business location = City Names as post type
business type as taxonomy

you can use this plugin: https://wordpress.org/plugins/custom-post-type-ui/

4 steps:

# install the plugin
- install the plugin

# create custom post type
- go to CPT UI menu, then click Add New
- fill the form (see [[LINK href="http://i.imgur.com/KgkKH3v.png"]]http://i.imgur.com/KgkKH3v.png[[/LINK]])
- click Advanced Options
- set Has Archive as <strong>True</strong>, and type "<strong>lawyer</strong>" as Custom Rewrite Slug (see [[LINK href="http://i.imgur.com/hb03njm.png"]]http://i.imgur.com/hb03njm.png[[/LINK]])
- click button "Create Custom Post Type" at the bottom

# create taxonomy
- fill the form and check/thick "<strong>Business Profiles</strong>" as Attach to Post Type (see [[LINK href="http://i.imgur.com/vqcazuc.png"]]http://i.imgur.com/vqcazuc.png[[/LINK]])
- click Advanced Options
- set Hierarchical as <strong>True</strong>, type "<strong>business-type</strong>" as Custom Rewrite Slug and Show Admin Column as <strong>True</strong> (see [[LINK href="http://i.imgur.com/3WK0jSd.png"]]http://i.imgur.com/3WK0jSd.png[[/LINK]])

#create php files in the theme folder
- single-business_location.php (for: dm.com/lawyer/city-name)
- archive-business_location.php (for: dm.com/lawyer/)
- taxonomy-business_type.php (for: dm.com/business-type/type-name)