OK. Looking at the code above, it:
– Adds the function my_post_nav
high up in the page processing (in “wp_head”);
– Checks if WP-Page-Navi is installed and exits if it’s not;
– Removes Customizr’s navigation from after the “loop” (which is the “thing” in WordPress that churns out posts (either lots of them, or one of them);
– Adds WP-PageNavi’s navigation after the “loop” (which is after all the posts have been churned out; at the bottom of the page).
So by my reckoning, if you want to add WP-PageNavi to the top of the category page as well, you can simply add it again in the code above. You only want it on the category pages, so you need to check that you are not on a single post/page and that you are in a category list. So in the end, the code you posted above should be changed to:
add_action('wp_head', 'my_post_nav');
function my_post_nav(){
if ( !function_exists('wp_pagenavi') ) {
return;
}
remove_action( '__after_loop' , array( TC_post_navigation::$instance , 'tc_post_nav' ), 20 );
add_action( '__after_loop', 'wp_pagenavi', 20 );
if ( ! is_singular() && is_category() ) {
add_action( '__after_archive_title', 'wp_pagenavi', 20 );
}
}
I haven’t tested this, so be prepared for it to break on a syntax error. Let us know what happens.
p.s. When you paste code, use backticks, or the “code” button next to the b-quote button.