Checking, Verifying and Updating of WordPress 2012 Child Theme with Parent Theme updates

Hi

Thanks Mr Tyler Postle for your very prompt reply which is sincerely appreciated.

My WordPress 2012 Child Theme folder contains only the following items below which I find is too brief and incomplete as the original 2012 Parent Theme contains several pages of codes and items.

/*
Theme Name: Twenty Twelve Child
Theme URI: http://hu-techconsulting.com/twentytwelve-child/
Description: Twenty Twelve Child Theme
Author: Benjamin Chan
Author URI: http://hu-techconsulting.com
Template: twentytwelve
Version: 1.0.0
*/

@import url('../twentytwelve/style.css');

.entry-content img,
.comment-content img,
.widget img,
img.header-image,
.author-avatar img,
img.wp-post-image {
box-shadow: none;
}

Can help to check and verify whether the foregoing brief items in my 2012 Child Theme are IN ORDER and COMPLETE please? If incomplete, can help to copy and paste what is missing in the Child Theme from the 2012 Parent Theme please?

If my Child Theme is not updated with relevant codes and items from the Parent Theme, then I am afraid when I upgrade to WordPress 4.2 from WordPress 4.1, I will encounter problems in my website.

I have activated staff access for your checking, verification and necessary action, when required, please.

Thanks in advance for your help and support. Best regards.

Benjamin

  • Tyler Postle

    Hey Benjamin,

    No problem, happy to help!

    Instead of using the @import method for the parent style.css it is better to use the wp_enqueue_scripts action in the functions.php - I see you don't have a functions.php in your child theme yet, so I've attached one with the enqueue script :slight_smile:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }

    Again, just unzip and then upload to your child theme. After uploading this you can remove the @import line from your child theme style.css.

    Unless you have any further custom styles to add to your child theme style.css you don't need any further code in there :slight_smile:

    Just make sure any custom code that you may have added to your parent theme style.css is moved over to your child theme to ensure it's safe through updates.

    And as with any major update, always do a full site backup before upgrading, better to be safe than sorry.

    Hope this helps! If you have any further questions just let me know in this thread.

    Cheers,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.