Redirect after deleting post and keep track of pagination
You can use $_SERVER[‘HTTP_REFERER’] to get the URL the user came from. The following code will find the paged GET variable of the previous URL to determine which page the user was on, then count how many posts are left of that particiular post type (only published) and how many pages are needed to display … Read more