ajax – change wordpress pagination url after doing the request

Question

I’m working with WordPress pagination,

I want to modify the returned URL when I click on a pagination link (number 2 for example in the pagination),
at the moment I get: https://magicpallet.com/blog-2/page/2/

This pagination is used inside a plugin (blog posts in WP-tabs), so I want to modify this URL after the request is sent, to: https://magicpallet.com/blog-2/,

i need to redirect the URL after request to the link above, because i’m using the shortcode inside menu tabs, and so i need the initial URL of the page so the tabs keeps working and returning its content…

I’m trying to use hooks to do this, but so far I haven’t come across the right one that allows me to do what I mentioned above, i tried paginate_links() , but it changed the request URL all together at the request moment and so i don’t receive the result i want.

i want to only change the URL without changing the data that i receive from the pagination’s link i’m clicking on.

0
OmarAc 2 years 2022-06-10T05:19:35-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse