I've been having issues on creating new wordpress blogs where I'm setting permalinks via script on theme activation. However, even though they appear to be correct when I check the permalink settings in WP, my new pages are throwing 404 errors.
The only fix I've found is that I have to go back to permalink options and click "Save Changes", even though, according to the display, I've made no changes to need to save...
I'm setting permalinks to /%postname%/
Here's how I'm doing it.
if(get_option('permalink_structure')==""){update_option('permalink_structure', '/%postname%/');}
That script gets run when my theme is activated.
Any ideas why it only partially does the job?