This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Change term order of Taxonomy Frontend outpus

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Change term order of Taxonomy Frontend outpus Reply To: Change term order of Taxonomy Frontend outpus

#35741
Ernest MarcinkoErnest Marcinko
Keymaster

Hi!

There is one hook, which may help you with that:

$terms = apply_filters('asp_fontend_get_taxonomy_terms',
	$terms,
	$taxonomy,
	array(
		'orderby' => $term_ordering[0],
		'order' => $term_ordering[1],
		'include' => $terms,
		'include_ids' => $term_ids
	),
	$all_terms_were_requested
);

The $terms is the array of taxonomy term objects returned via the get_terms(..) core wordpress function.
You can either change the existing $terms array, or construct your own, and the plugin will display them in that order.

Before output, the plugin will do a minor change after this hook – it may move child terms after their corresponding parent term for correct displaying. If the terms are alrady ordered correclty (parent -> child -> grandchild -> etc..), it should not affect the final output.