• Hi,

    I am very new to WordPress.

    I am redoing a relative’s website so I am working on a staging environment on a subdomain. √

    dev.dentistryon7.com/wp √

    I purchased a theme √

    I started making some tweaks to the theme √ Then I discovered the concept of child themes.

    I tried to create a child theme, following instructions in codex. https://codex.www.ads-software.com/Child_Themes
    Created a style.css file and a functions.php file with this code in it:

    <?php

    /* Twenty Fourteen functions and definitions*/
    /* Calling parentstyle with several style.css*/

    /*Setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet loads after it.*/

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘twentyfourteen-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘your child theme filename-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘twentyfourteen-style’)
    );
    }

    When I try to activate (or switch back to my parent theme) I get the error message:

    “Fatal error: Class ‘Vc_Grid_Item_Editor’ not found in /home/dentis81/public_html/dev/wp/wp-content/plugins/js_composer/include/autoload/vc-grid-item-editor.php on line 254”

    I tried uninstalling and reinstalling the parent theme but the problem persists (and even after uninstallation it seems like some of the dummy content I had previously uploaded is still there).

    Any advice on how I can get a clean slate and start working on the website while tweaking the parent theme would be greatly appreciated

Viewing 10 replies - 1 through 10 (of 10 total)
  • “Fatal error: …/wp-content/plugins/js_composer/…”

    Try deactivating that plugin and see what happens.

    Thread Starter csigabiga83

    (@csigabiga83)

    Thanks for your reply. When I try to deactivate, via the WP dashboard, I get the same error message and the plugin doesn’t deactivate or uninstall

    Fatal error: Class ‘Vc_Grid_Item_Editor’ not found in /home/dentis81/public_html/dev/wp/wp-content/plugins/js_composer/include/autoload/vc-grid-item-editor.php on line 254

    If you have cPanel > File Manager or FTP/SFTP > FileZilla (for example) access to your files at the server, go to your installation and temporarily rename ‘/wp-content/plugins/js_composer/’ to something like ‘/wp-content/plugins/js_composer-hold/’ to manually deactivate it.

    Thread Starter csigabiga83

    (@csigabiga83)

    OK. Tried that, it makes my site looks like a big jumble of code – both in parent theme and child.

    On the dashboard, it does tell me that the theme requires the plugin that was causing problems.

    Upon changing the plugin name back, I am successfully in the child theme but it looks like a lot of things are missing (the logo, the images on the slider, I don’t want the search bar there)

    Can I just start making changes to the child theme? Can I make them from the WP dashboard and FTP manager (in my child theme) as I normally would and everything is just taken care of?

    Thread Starter csigabiga83

    (@csigabiga83)

    Update: Something definitely not alright. No images showing on site. I tried to add a logo for example but not showing up

    Ah, please forgive me for missing an important clue in all of this! The Child Theme code you have posted appears to be from a sample Child Theme referencing Twenty Fourteen, and that code is not going to work with the theme you appear to be using:
    https://themeforest.net/item/medicenter-responsive-medical-wordpress-theme/4718613?ref=QuanticaLabs&ref=QuanticaLabs&clickthrough_id=478969073

    Some themes are better suited than others for a Child Theme, so you might or might not be able to make a Child Theme for that specific theme by using a configurator (or on your own):
    https://www.ads-software.com/plugins/search.php?type=term&q=child+configurator

    Either way, however, you will need to go to the source of that theme for its support if you continue with it since these forums are only for supporting WordPress, themes and plugins as from www.ads-software.com.

    Thread Starter csigabiga83

    (@csigabiga83)

    FWIW, I myself made an error in this post, as I actually substituted my theme for Twenty Fourteen in every place possible.

    The code is as such:

    <?php

    /* medicenter functions and definitions*/
    /* Calling parentstyle with several style.css*/

    /*Setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet loads after it.*/

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘medicenter-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘medicenter-child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘medicenter-style’)
    );
    }

    That being said, your point that not every theme is suited for a child theme is well taken and unless you or anyone else has any insights, I will raise the issue with the support for my theme

    David_G

    (@questas_admin)

    Thread Starter csigabiga83

    (@csigabiga83)

    Questas,

    I have seen that, but according to this, https://codex.www.ads-software.com/Child_Themes
    I understand that the method of importing the parent theme stylesheet using @import as described in this article, is no longer best practice

    The plugin seems like an interesting option though.

    I understand that the method of importing the parent theme stylesheet using @import as described in this article, is no longer best practice

    That is why I did not mention a specific plugin even though I have yet to have any trouble with Child Theme Configurator.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Tried to make a child theme – Created a Mess’ is closed to new replies.