D
D
Darklez2017-03-07 15:36:30
Search Engine Optimization
Darklez, 2017-03-07 15:36:30

How to sort categories by hierarchy or by id?

Good evening,
I am using a WordPress site. The site uses WooCommerce and All in one SEO plugins.
The site works as an online store with a catalog of goods. The site has categories and subcategories of products.
In the title and description (meta.php file in single-product, in WooCommerce plugin templates), a list of categories of a particular product is displayed.
Unfortunately the list of categories is given in alphabetical order. Please tell me what to write in functions.php so that sorting is by slug or category Id.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question