WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Custom Post Type in Parent Theme causing 404s

[Resolved] Custom Post Type in Parent Theme causing 404s

  • Happy Friday,

    I’m customizing a theme for a client from a theme they bought off of themeforest.net. I created a child theme, where all the customization is located.

    Here is the issue:
    There are several custom post types in the parent theme that work perfectly if you use the parent them. But as soon as the child them is activated, I get 404 errors.

    Some Notes:

    • I’ve flushed rewrite rules and changed and saved the permalink, but no help.
    • The parent theme’s CPT shows in the admin backend, just not on the frontend.
    • I added a cpt to the child theme and it works perfectly.

    Any ideas????

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    @esmi

    Forum Moderator

    I’m sorry but as you are using a commercial parent theme, you need to seek support from the theme’s developer/vendor. We do not support commercial themes here.

    I understand. However, I know I’ll see this issue again somewhere down the pike that is not necessarily linked to a specific theme or author.

    I just thought someone may have run across a quick tip along the way.

    Issue fixed!

    Here’s a tip for everyone dealing with other author’s themes:
    Add the following code if there are custom post types in the parent

    add_action( 'after_theme_setup', 'child_after_theme_setup' );
    function child_after_theme_setup() {
        flush_rewrite_rules();
    
    }

    It’ll save you a bunch of time and headaches.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Custom Post Type in Parent Theme causing 404s’ is closed to new replies.