I need to create Plugin for Custom Post Type (Product) and got problems when creating widgets Archive for the CPT.
1. I got 404 for this URL: tomi.com/product/2014/03/12
I suspect this problem rewrite rule. I've read some articles but still no clue (or maybe I missed some important links out there?)
The following URLs are worked:
tomi.com/2014/03/?post_type=product
tomi.com/?m=201403&post_type=product
2. How to generate a URL like tomi.com/product/2014/03 using wp_get_archives()?
I used following code to generate tomi.com/?post_type=product&m=201403
$ options = wp_get_archives ($ parameters);
$ options = str_replace ('? m =', '? post_type=product&m=', $ options);
But the code was only valid if I use the Default Permalink.