“The” fix for the listing taxonomy re-order issue
-
Hey there, smart folks.
I’ve searched for this answer a lot across multiple sites and I cannot put together the answer properly. All I want to do is add a filter to the AgentPress Pro child theme so I can stop modifying this Agentpress-Listing plugin.
This is an example of a similar filter that should work:
add_filter(‘woocommerce_get_catalog_ordering_args’, ‘am_woocommerce_catalog_orderby’);
function am_woocommerce_catalog_orderby( $args ) {
$args[‘meta_key’] = ”;
$args[‘orderby’] = ‘name’;
$args[‘order’] = ‘ASC’;
return $args;
}What I need to do is have this re-written to make the orderby and order changes, but for the Genesis AgentPress Pro and Agentpress-Listings plugin instead of this Woocommerce stuff.
Currently, I am modifying the plugin directly (as shown below) to get it to do what I want on my site. Obviously, if the plugin is updated, I will have to go back in and fix it again…
$terms = get_terms( $tax, array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘number’ => 100, ‘hierarchical’ => false ) );
if ( empty( $terms ) )
continue;Can someone help me out?
Thanks!
B
- The topic ‘“The” fix for the listing taxonomy re-order issue’ is closed to new replies.