[wp-hackers] Rewrite rule for pages from old site

Brenda Egeland brenda at redletterdesign.net
Fri Jun 22 13:03:59 UTC 2012

I am converting a non-WP site to WP. There are hundreds of files in the form:sermons/sermon20120325.php

These can be found on the new site at /sermon/2012/03/25?post_type=sermon 

Sermon is a custom post type. I've tried add this to my functions.php for a custom rewrite rule:

add_action('init', 'find_old_sermons');
function find_old_sermons() {
  add_rewrite_tag("%sermons%", '([^/]*)'); 

But I keep getting a sorry...not found. I've tried resaving the permalinks in the Settings panel, and still no luck.

Thanks for your help.

Brenda Egeland
Red Letter Design

More information about the wp-hackers mailing list