404 error after publishing a post

My issue is prety much what the title indicates. Whenever I publish a new post, everything works fine – the post is listed in my WP dashboard and all looks good. However, if I try to ‘view post’ to view it live on my website,

I’ve searched for this issue throughout the net, and all point into editing the .htaccess file. However, this issue is more likely related to a theme I’ve developed (why? because several buyers have reported this issue, so I need to find a fix for the theme itself).

Read More

That said, editing or manipulating the root .htaccess file is not really an option as the issue is originated in my theme.

Best,
Chris

Related posts

Leave a Reply

1 comment

  1. I just ran into something similar to this. It had to do with refreshing permalinks. If you go to Settings -> Permalink and just click save see if it fixes your problem. It did for me. In the end I added the following to my functions.php file which updated the permalinks for me. I was using custom post types. Maybe you have a plugin that is doing the same.

    add_action('admin_init', 'flush_rewrite_rules');