i can see this but don’t know how to switch to price
<?php
// Order by date url
$order_date = isset( $_GET['order-date'] ) ? esc_attr( $_GET['order-date'] ) : '';
if( isset( $order_date ) && $order_date == 'asc' ) {
$date = 'desc';
}elseif( isset( $order_date ) && $order_date == 'desc' ) {
$date = 'asc';
}else{
$date = 'asc';
}
// Order by price url
$order_price = isset( $_GET['order-price'] ) ? esc_attr( $_GET['order-price'] ) : '';
if( isset( $order_price ) && $order_price == 'asc' ) {
$price = 'desc';
}elseif( isset( $order_price ) && $order_price == 'desc' ) {
$price = 'asc';
}else{
$price = 'asc';
}
?>