Os class finding a certain category

523 Views Asked by At

In osclass I need to check if my category is a job category and add some code to it. How can i find if it is a particular category or not. Pls can any tell me.

1

There are 1 best solutions below

0
On

Helpers for categories are in /oc-includes/osclass/helpers/hCategories.php.

In the while(osc_has_categories()): loop, you can use :

  • osc_category_id(), to check if the id is the one you're looking for.
  • osc_category_slug(), to check if the slug is equal to job.

See http://doc.osclass.org/HCategories.php for the full list of categories helpers.