Custom Post Type pages are “not found”

For fixing custom post not found please use below code in your functions.php: flush_rewrite_rules( false ); You should only do this as a temporary measure otherwise it will run on every page load. For more details please follow this link As for the archive-top_charts.php not appearing, make sure you have ‘has_archive’ => true when you’re … Read more

where is permalink info stored in database?

In the wp_options table there is a record where option_name = “permalink_structure”. However, the true, ultimate control of url rewriting is controlled by the WP_Rewrite API which saves/caches its information in the rewrite_rules wordpress option (also found in the wp_options table). EDIT: Also, when editing a page/post, you can change the “permalink” for that page/post … Read more

remove “index.php” from permalinks

Go to your WP-ADMIN–>Settings–>Permalink and use the permalink structure change there, if it generate any .htaccess file copy the content and update your .htaccess file. Or Check if your hosting mod_rewrite is enable by creating a file phpinfo.php with content, <?php phpinfo();?> Upload this file and browse via Browser. So you know which modules are … Read more

Mixing custom post type and taxonomy rewrite structures?

You can always override the template that will be called with the template_include or a related filter, but this might hide deeper problems with custom archives. As I understand it, you want to use the following structure: /glossary/ should be an archive page for all sumo-glossary-term posts /glossary/[letter]/ should be an archive page for posts … Read more

Permalinks: custom post type -> custom taxonomy -> post

First, register your taxonomy and set the slug argument of rewrite to shows: register_taxonomy( ‘show_category’, ‘show’, array( ‘rewrite’ => array( ‘slug’ => ‘shows’, ‘with_front’ => false ), // your other args… ) ); Next, register your post type and set the slug to shows/%show_category%, and set has_archive argument to shows: register_post_type( ‘show’, array( ‘rewrite’ => … Read more

How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

After combining a bunch of pieces of other answers I got it working! So here’s the solution for those of you who are struggling with this too: This post and this one helped me out some, so thanks to those guys. Note, all this code, plus your initial custom post type and taxonomy registration code … Read more