I have attached several custom columns to the WP users which are displayed in the admin Users list.
I have made the columns sortable in that I've set up the ordebry and order GET params to filter by these values. BUT they're not 'clickable'. So they're not A-tags which link to the said query. I've been googling around about this issue for a while and can't find any solution that has worked this far. I've even made the plugin manually print the table head names clickable by:
<th scope="col" id="company_name" class="manage-column column-company_name sortable <?= ( $orderby == 'company_name' && $order == 'desc' ) ? 'asc' : 'desc' ?>"> <label for="company_name"> <a href="<?= get_current_screen() ?>?orderby=company_name"> <span><?= esc_html_e( 'Firmanavn', 'ndebf' ) ?></span> <span class="sorting-indicator"></span> </a> </label> </th>
But during page render they just turn out as non-A-tags.
So how do I make the column head text clickable so that it redirects with said orderby and order query?