url rewriting - Wordpress Page rewrite URL not working -


i seek solution problem. setup page sub pages serve holding custom post_type each subpages.

news

  • event
  • article
  • press release

on pages add custom rewrite url can add custom url archive page, here code did sample in events

add_rewrite_rule('news/events/archive/([0-9]{4})/?$', 'index.php?pagename=events&yyyy=$matches[1]','top'); add_rewrite_rule('news/events/archive/([0-9]{4})/([0-9]{1,2})/?$', 'index.php?pagename=events&mm=$matches[2]&yyyy=$matches[1]','top'); 

but problem if visited url example, www.site.com/news/events/archive/2013/ redirect me page url www.site.com/news/events/

is there solution or fix solve problem?

tia, thanks


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -