Search...
getCategories( )
Gets the site category information.
Description
The getCategories()
function returns a Promise that resolves to the site's
category information.
The retrieved category information is the information that has been entered in the General Info section of your site's Dashboard.
Syntax
function getCategories(): GeneralInfoCategories
getCategories Parameters
This function does not take any parameters.
Returns
Fulfilled - An object containing the site category information. Rejected - Error message.
Return Type:
Promise<GeneralInfoCategories>
NAME
TYPE
DESCRIPTION
primary
string
Primary site category.
secondary
Array<string>
List of secondary site categories.
Was this helpful?
Get site category information
Copy Code
1import wixSiteBackend from 'wix-site-backend';23export function getCategories() {4 return wixSiteBackend.generalInfo.getCategories();5}67/*8 * {9 * "primary": "business",10 * "secondary": ["technology-apps"]11 * }12 */