I\'m using:
I register custom taxonomy (catalog)
When you create any CPT then you need to add this function.
flush_rewrite_rules();It will manage/adjust/reassign your memory.1: Add this function : flush_rewrite_rules();
2:Your pagination function (wp_pagenavi()) will call just below the endwhile;I 'm sure,your pagination will work and let me know if it will not work.