Tagged: child theme
- This topic has 12 replies, 2 voices, and was last updated 9 years, 3 months ago by Sakin.
-
AuthorPosts
-
September 6, 2015 at 4:09 pm #66204LiziParticipant
Hi
I created a child theme of Catch Evolution Pro and called it:
Catch Evolution Pro Child ThemeI’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 ThemeIn my ftp themes folder they are labelled correctly:-
catch-evolution-pro
catch-evolution-pro-childCan you help?
Many thanks
LiziSeptember 6, 2015 at 4:11 pm #66205LiziParticipantUpdate to this:
So I now have two child themes in wp control panel theme area
September 6, 2015 at 4:12 pm #66206LiziParticipantI 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’);
}
?>September 7, 2015 at 12:09 am #66234SakinKeymaster@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.September 7, 2015 at 4:23 pm #66374LiziParticipantHi 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?
LiziSeptember 7, 2015 at 5:23 pm #66376LiziParticipantMore info:
Child css has centered image
Parent css has position left imageThe 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!
September 9, 2015 at 1:19 am #66462SakinKeymaster@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' );
September 9, 2015 at 4:24 pm #66522LiziParticipantThanks 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?
September 9, 2015 at 6:00 pm #66527SakinKeymaster@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.
September 9, 2015 at 6:27 pm #66538LiziParticipantHi 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
LiziSeptember 9, 2015 at 6:29 pm #66540SakinKeymaster@Lizi: Please post in your site URL.
September 9, 2015 at 6:39 pm #66546LiziParticipantHi 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
LiziSeptember 9, 2015 at 8:37 pm #66560SakinKeymaster@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%; }
-
AuthorPosts
- The topic ‘Child Theme problem’ is closed to new replies.