Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #66204
    Lizi
    Participant

    Hi

    I created a child theme of Catch Evolution Pro and called it:
    Catch Evolution Pro Child Theme

    I’ve been happily working on the theme and now suddenly I get error messages in the WP control panel for example:

    You don’t have sufficient permissions to update this page
    The active theme is broken. Reverting to the default theme.

    When I checked the Themes area in Wp I see that the main theme’s name has changed to:
    Catch Evolution Pro Child Theme

    In my ftp themes folder they are labelled correctly:-
    catch-evolution-pro
    catch-evolution-pro-child

    Can you help?

    Many thanks
    Lizi

    #66205
    Lizi
    Participant

    Update to this:

    So I now have two child themes in wp control panel theme area

    #66206
    Lizi
    Participant

    I wonder if I have created the child theme incorrectly, this is what I have in my child theme’s function file:

    <?php
    /**
    * Child Theme functions and definitions
    *
    */

    /**
    * Loading Parent theme stylesheet
    *
    */
    add_action( ‘wp_enqueue_scripts’, ‘catchevolution_child_enqueue_styles’ );
    function catchevolution_child_enqueue_styles() {
    wp_enqueue_style( ‘catchevolution-parent-style’, get_template_directory_uri() . ‘/style.css’ );

    wp_enqueue_style(‘catchevolution-parent-responsive’,get_template_directory_uri() . ‘/css/responsive.css’);
    }
    ?>

    #66234
    Sakin
    Keymaster

    @Lizi: You don’t need to enqueue responsive.css. You child them functions.php can be as below:

    <?php
    /**
     * Child Theme functions and definitions
     *
     */
    
    /**
     * Loading Parent theme stylesheet
     *
     */
    add_action( 'wp_enqueue_scripts', 'catchevolution_child_enqueue_styles' );
    function catchevolution_child_enqueue_styles() {
        wp_enqueue_style( 'catchevolution-parent-style', get_template_directory_uri() . '/style.css' );
    }

    According to error message above, you have issue in parent theme. So, can you re-upload all theme files in catch-evolution-pro directory.

    #66374
    Lizi
    Participant

    Hi there, thanks for your quick reply. I’ve amended my functions.php file as suggested and uploaded the new theme version.

    I found out why I was getting the errors – I had renamed the parent style sheet as the theme was using both the parent and child css files. Of course then it came up to say there was an error with the parent css file and that’s what made the site revert to the default theme.

    The problem now of course is how to turn off the parent css?

    Hope you can help?
    Lizi

    #66376
    Lizi
    Participant

    More info:

    Child css has centered image
    Parent css has position left image

    The image is positioned to the left

    Also I can not get my child responsive.css to work – this is coming in from the parent folder.

    Very confusing!

    #66462
    Sakin
    Keymaster

    @Lizi: To remove parent theme responsive css, you can add the following code in your child theme functions.php file

    function catchevolution_remove_style() {
    	wp_dequeue_style( 'catchevolution-responsive' );
    }
    add_action( 'wp_print_styles', 'catchevolution_remove_style' );
    #66522
    Lizi
    Participant

    Thanks very mush for the information.

    How do I ask the theme to now use the child responsive.css?

    Also, my child style.css is being over ruled by the parent style.css, how can I fix this?
    For example:
    Child style.css has centered image
    Parent style.css has position left image
    When you view the site from the front end you see the image is positioned to the left and it should be centered.

    Hope you can help?

    #66527
    Sakin
    Keymaster

    @Lizi: You can add in your responsive css in your child theme style.css file. You don’t need to add extra file. Maybe your css is different. As child theme style.css is always given priority over child theme style.css. So, post in your site URL and let me which css are you taking about.

    #66538
    Lizi
    Participant

    Hi there, many thanks

    It might be easier if I ask you how do I center the logo? The template currently has it placed to the left.

    Many thanks
    Lizi

    #66540
    Sakin
    Keymaster

    @Lizi: Please post in your site URL.

    #66546
    Lizi
    Participant

    Hi there

    I don’t want to post it to a public forum.

    Could you just let me know how to center the logo on the parent theme pro evolution?

    Many thanks
    Lizi

    #66560
    Sakin
    Keymaster

    @Lizi: It depends on how you have added in. If you have proper logo then you can simply add the following css in “Appearance => Theme Options => Custom CSS” box:

    #logo-wrap {
        width: 100%;
    }
    #site-logo {
        display: block;
        width: 100%;
    }
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Child Theme problem’ is closed to new replies.