seo-by-rank-math icon indicating copy to clipboard operation
seo-by-rank-math copied to clipboard

Add filter to the Author and Date archives redirect (like it is for Attachments)

Open obedparla opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

There's no filter to override or modify a redirect for Date or Author archives. In line: https://github.com/rankmath/seo-by-rank-math/blob/master/includes/frontend/class-frontend.php#L173

Describe the solution you'd like The same solution that's currently present for Attachment redirects, a filter to allow devs to change the redirect: https://github.com/rankmath/seo-by-rank-math/blob/master/includes/frontend/class-frontend.php#L159

Additional context We're developing a website builder (breakdance.com) and if the Date archives are disabled (which I believe is the default) it creates an error on the builder when we try to request info from such archives via ajax.

We had the same issue with attachments as they also redirect, but we could fix it by using the filter to ignore the redirect for our own ajax requests. No such luck for Author and Date archives.

obedparla avatar Sep 11 '22 18:09 obedparla