I need to add the following script to the head section. How do I access the head section in the X theme?
Hi @eutaw,
Please install and activate the child theme and login through FTP then edit the functions.php then add this code:
add_action('wp_head', 'add_header_code');
function add_header_code(){
?>
<!-- Add the code here -->
<?php
};
Hope this helps.
I installed and activated the child theme on another site as a test. However, when the child theme is activated, X theme is not activated. Is this correct? Also, when the child theme is activated, it appears that I lose my custom settings like background color for some sections. Please point me in the right direction.
The website that I’ve installed it on is modernchurchwebsites.com. Login info is in the secure section.
Hey @eutaw,
Yes this is correct, when the child theme is active, the parent theme will be deactivated. Child theme inherits the look and feel of the parent theme and all of its functions. You can learn more about child themes here https://theme.co/docs/child-themes
Activating the child theme doesn’t lose any customization however upon checking your setup I see you’ve updated the X theme but didn’t update Cornerstone this might be causing the issue. Please update Cornerstone as well and see if this resolves the issue.
After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.
Let us know how this goes!
Updating Cornerstone did fix most of the problems, but the last section on my homepage changes when I activate the child theme. Furthermore, the text element (Start your …) seems to have disappeared even when X theme is activated. Activating the child theme seems to have caused problems.
Hey @eutaw,
The issue was, you added the custom CSS in the Appearance > Customize > Additional CSS and when you activated the child theme the CSS added in the Additional CSS also got removed. I’ve moved all of your custom CSS to X > Theme Options > CSS and activated the child theme and it seems to have fixed all issues.
Always add you custom CSS either in X > Theme Options > CSS or in the child theme to avoid such type of issues.
Don’t forget to clear all caches including your browser’s cache and test your homepage now. Cheers!
Thank you much! Just to be clear, what is Appearance > Customize > Additional CSS for? When I want a column to have a minimum height, where would that CSS go?
Hi @eutaw,
To add any custom CSS, you can either add it to X > Theme Options > CSS or in the child theme’s style.css file.
The Additional CSS section is provided by WordPress for adding custom CSS but It’s best that you use the theme options for any customization.
Hope this helps!
Thanks very much.
You are most welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.