Categories are used to organize listings in the directory. phpListings supports an unlimited number of levels of sub-categories. Each category may include name, icon, summary, description, logo and header images, category meta tag values. A separate set of categories is required for each listing type.

Listing type categories can be managed under "Administrator - Content - Type Name - Categories".

Four placement options are available for a new or existing category:

"New Category" - to add a new root category or move an existing category to the root.

"Subcategory Of" - to make a new or existing category a child of the selected category.

"Before" - to make a new or existing category appear before the selected category.

"After" - to make a new or existing category appear after the selected category.

When editing an existing category you can skip the "Placement" setting to keep the existing category position.

Only final categories without listings can be deleted.

 

Primary and Extra Categories.

Listing primary category is a category which is used to build the listing category breadcrumb and determine the list of available listing form fields. The associated listing will appear in its primary category and ancestors of that category on the search results page.

A listing can be assigned to one or multiple extra categories if allowed by the product. These categories do not affect the listing category breadcrumb and custom fields but make that listing appear in those categories (excluding category ancestors) on the search results page.

 

Listing Placement Requirements.

You can submit listings and link products and form fields to final categories only. These can be root or any child category without children.

If you update the category structure make sure to keep the existing listings in final categories. For example, we have a category "Business" which is final (no child categories) and there are several listings in that category. We want to add sub-categories to that category but keep those listings. Here is the recommended way to achieve this:

  1. Rename the "Business" category to "Temp".
  2. Create a new "Business" category as a root category.
  3. Edit "Temp" category and set "Business" as a parent category for it (check "Subcategory of" radio).
  4. Now, when you have "Temp" as a sub-category of "Business" you can create new sub-categories and ask your listing owners to edit their listings and set new category if they want.

 

Add Multiple Categories.

This is possible to quickly import a large number of categories with sub-categories into a new or existing setup.

Click the "Add Multiple Categories" button under "Administrator - Content - Listing Type - Categories" to access the tool.

You can flag all imported categories as "Published" or "Featured" by default, set the default map marker icon, map marker color and select linked listing fields and products similar to the single category submission form.

The list of categories must be inserted into the "Categories" field in the following format:

Category;Sub-category;Sub-sub-category
Category;Sub-category;Another Sub-sub-category
Category;Another Sub-category

A complete path to a last category child must be specified one per line with a semicolon as a delimiter, no need to enclose items with double quotation marks. Note that semicolon is not allowed in category names.

You can import child categories to an existing category, just make sure to specify the exact parent category name. The import scripts check if the category exists before attempting to create it.