1. Home
  2. Wordpress
  3. Custom post not found

When registering a new custom post type you can encounter a bug where a single custom post returns a 404 page even when a valid page template exists. To fix it add the following snippet to the functions.php file. Make sure to remove it once the bug is fixed as you do not want it to run with each page load.

#wordpress#php
flush_rewrite_rules( false );
copy
Full Wordpress cheatsheet
NordVPN NordVPN