Skip to main content
7 events
when toggle format what by license comment
Nov 11, 2012 at 18:26 vote accept andy
Nov 11, 2012 at 16:00 comment added s_ha_dum Edited my answer
Nov 11, 2012 at 16:00 history edited s_ha_dum CC BY-SA 3.0
Edited for a better solution
Nov 10, 2012 at 8:18 comment added andy Thanks again for your help @s_ha_dum Hooking into template_redirect didn't work either unfortunately. After reading link I tried hooking the function into 404_template, but then it redirects all 404's to the home page rather than just the ones that match the max_num_pages < paged formula.
Nov 9, 2012 at 17:29 comment added s_ha_dum So you get the redirect before you function runs? Hmm... try remove_action('template_redirect','wp_old_slug_redirect'); and see if that helps. If it does maybe try hooking to template_redirect instead of wp.
Nov 9, 2012 at 16:53 comment added andy Thanks for that - though I still have a problem. The function to check max_num_pages to paged works up until a page when the max_num_pages < paged, at which point the automatic 404 kicks in, so I guess that I need to block that functionality first, before using the wp_safe_redirect.
Nov 9, 2012 at 1:39 history answered s_ha_dum CC BY-SA 3.0