Custom permalink structure for custom post type results in 404

The problem with the code you’ve posted is that you’re using the timestamp to create the permalink, and using it in add_rewrite_rule as if the timestamp was the post ID of the recipe. The p-parameter in index.php?post_type=recipe&p=$matches[1] is used for passing post ID’s. Thus, WordPress will start looking for a post with an ID like … Read more

Single page problem when permalink type changed

Can you make sure that your .HTaccess is writable with necessary permissions that includes the Following as I suspect that WP is not able to alter it : # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress