• Hi everyone,

    For quick reference –
    Theme: PopularFX
    Installed Plugins:

    1. Pagelayer
    2. Sportspress Pro
    3. Hide Admin Bar Based On User Roles

    I should note that this error occurs with just pagelayer installed and nothing else.

    I’m having trouble installing a child theme, something that seems so simple, but breaks my site entirely every time I do it. I install a VERY basic child theme, with a VERY simple style.css and functions.php – shown below

    style.css

    /*
     Theme Name:   PopularFX Child
     Author:       Tyler R.
     Template:     popularfx
     Version:      1.0.0
    */

    functions.php

    <?php
    
    add_action( 'wp_enqueue_scripts', 'elev8_enqueue_parent_styles' );
    function elev8_enqueue_parent_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    ?>

    I know the functions.php isn’t exactly typical, I was just trying to make it as bare-bones as possible because I’m having this issue. Whenever I upload the child theme and activate it, the site becomes unreachable with the error:
    There has been a critical error on your website.

    The only way I’ve been able to fix this is literally reinstalling wordpress through softalicious and I don’t want to do that because I’ve made some progress on certain settings that I don’t want to have to go through again.

    Thanks in advance for any help!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Rather than worry with building a child theme manually why not just install this plugin and create a child theme with it that should work out of the box.

    https://www.ads-software.com/plugins/child-theme-configurator/

    Then try adding your changes to that child theme one change at a time making sure those changes work before moving forward to the next change.

    Once you’re done with the plugin you can then disable it… your new child theme will still work without the plugin.

    Thread Starter tyler53

    (@tyler53)

    @jnashhawkins hmm, I’ll try this when I can thanks – but in the meantime, does anyone have an idea as to how to get back to the old theme without access to the wordpress backend? this error comes up on the admin panel as well and I don’t know how to change the theme outside of wordpress (via FTP or CPanel or something)

    Oh, I misunderstood what you were asking…

    Killing the child theme via FTP or the cPanel file manager (just rename the child theme’s directory) would be the way I’d normally recommend. If WordPress can’t find the ‘active theme’ it defaults to whatever it can find from its past or throws up a really trashy textual page sometimes but you can usually get to ‘login’ from any of those results.

    If you have terminal access to your server via your hosting you can also navigate through that and remove or rename that child theme’s directory.

    There’s a right cool plugin for a file manager also if you can get logged in as admin to fix files… but you need WordPress to run first for the plugin to help. I figured I’d mention that also just to give you another option for your further experimentation. There’s a couple but this is the one I’ve been using…

    https://www.ads-software.com/plugins/wp-file-manager/

    And I imagine there are several ways to do ‘the rename deed’ from the WordPress command line if you have terminal access but if you had terminal access you’d have the ability from there to do most anything already… Not all hosts give terminal access.

    Thread Starter tyler53

    (@tyler53)

    @jnashhawkins Thanks for all the info! I’ll definitely try that out. However, I’ve tried renaming (and even deleting) the child theme and it still doesn’t fix the problem, I fear I’ve broken my site beyond repair and will have to start over again ??

    I tried it a few times… thinking the cache might be stale. I don’t think your PHP is running now as I don’t see WP at all.

    Can you shut down and restart your server or ask your host to do so? Or restart PHP? I hate to see you have to redo your other changes unless you have to and it’s possible one of those caused this but that function you added is what I suspect.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t Install Child Theme’ is closed to new replies.