Custom Category Ordering | WordPress.org

[ad_1]

You may use the teccc_legend_terms filter as documented in the src/views/legend.php file to return an ordered list of terms/categories. https://github.com/the-events-calendar/the-events-calendar-category-colors/blob/7229976135aa84c13b8f946715968d03c62eae74/src/views/legend.php#L22

Thanks for the quick reply Andy. 2 questions:

  1. When using the teccc_legend_terms filter , how is the order then determined?
  2. 2) Where can I find the legend.php file?

The above link shows where the file is.

You would code the order you want returned from the filter.

Found it, thanks.

Could you explain how this works please? > You would code the order you want returned from the filter.

The filter returns an array of terms. You would code the order of the array in your filter’s callback function and return that newly ordered array. The remaining code would use this as the order for the legend.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer