Change taxonomy list order |

I want to change the order of this taxonomy archive page “virtual-classes-cat” by its ID DESC

That page is being built by the theme so I don’t want to change the code since it’ll affect other pages… I tried the following code:

function hwl_home_pagesize( $query ) {
    if (is_tax('virtual-classes-cat') ) {
        $query->set('orderby', 'ID');
        $query->set('orderby', 'ASC');
add_action( 'pre_get_posts', 'hwl_home_pagesize', 1 );

But it is not making any difference to that page. Any suggestion? Thanks!

The page I need help with: [log in to see the link]

Source link