themezinho
Customization

How to create and use a child theme

A child theme inherits all functionality and styling from a parent theme (Themezinho) while letting you add or override anything safely. When you update the parent theme, your customizations stay intact.

Never edit the parent theme files directlyChanges made to parent theme files will be wiped out on the next theme update. Always use a child theme for any PHP, CSS, or template customizations.

Why use a child theme?

  • Your custom CSS survives theme updates
  • You can safely override template files (header, footer, single.php, etc.)
  • Your custom functions.php code won’t be lost
  • You can always revert to the parent theme’s defaults by deactivating the child

Method 1 — Create manually (5 minutes)

Step 1: Create the child theme folder

On your server (via FTP or cPanel File Manager), go to /wp-content/themes/ and create a new folder named themezinho-child.

Step 2: Create style.css

Inside the new folder, create a file named style.css with this content:

/*
Theme Name:   Themezinho Child
Template:     themezinho
Version:      1.0.0
*/

The Template line must match the parent theme’s folder name exactly.

Step 3: Create functions.php

Create a functions.php file in the child theme folder:

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

Step 4: Activate the child theme

Go to Appearance → Themes, find “Themezinho Child”, and click Activate.

Method 2 — Use a plugin (2 minutes)

  1. Install and activate the Child Theme Configurator plugin (free on wordpress.org).
  2. Go to Tools → Child Themes.
  3. Select “Themezinho” from the parent theme dropdown.
  4. Click Analyze, then Create Child Theme.
  5. Activate the generated child theme.

Adding custom CSS

The best place for custom CSS is your child theme’s style.css file. Alternatively, use Appearance → Customize → Additional CSS for quick changes — but note that Customizer CSS is stored in the database and won’t be part of your child theme.

Overriding template files

To override a template (e.g., the single post template), copy the file from the parent theme to your child theme folder, keeping the same relative path:

Parent:  /themes/themezinho/single.php
Child:   /themes/themezinho-child/single.php

WordPress will automatically use the child theme version when it exists.

Adding custom functions

Add custom PHP to your child theme’s functions.php. For example, to change the excerpt length:

add_filter('excerpt_length', function($length) {
    return 20;
});
Tip: Use action/filter hooksInstead of copying and modifying entire template files, try to use WordPress action and filter hooks wherever possible. It keeps your child theme lightweight and easier to maintain.
Support
Support
Customer Support