I've created list of custom taxonomy term and have problem with pagination.
I'm using WP PageNavi plugin to create pagination and I'm facing the problem with "get_queried_object()" function.
It takes term name from the link: http://domain.ltd/gallery/categories/term-slug.
When I click on next page, link changes to: ../gallery/categories/term-slug/page/2. Because link slug has been changed I'm getting an error.
Maybe you have any ideas how could i solve this problem? Thanks.