Skip to content

Child theme

Terrifico documentation

Child theme

Browse the documentation

Your settings are safe in theme updates without a child theme. Use one only if you want to change CSS beyond the Additional CSS box, or edit template files.

Create a child theme

  1. In wp-content/themes/, create a folder named terrifico-child.
  2. Add a style.css:
    /*
    Theme Name: Terrifico Child
    Template: terrifico
    Version: 1.0.0
    */
  3. Add a functions.php that loads it after the theme’s stylesheet:
    <?php
    add_action( 'wp_enqueue_scripts', function () {
    	wp_enqueue_style( 'terrifico-child', get_stylesheet_uri(), array( 'terrifico-style' ), '1.0.0' );
    }, 20 );
  4. Go to Appearance → Themes and activate Terrifico Child. Your Customizer settings for Terrifico don’t carry over automatically; export them first with Terrifico Pro (Terrifico → Theme Options → Export) and import them after switching, or set them again.

Overriding templates

Copy a file from the theme into the same path in your child theme and edit the copy, for example template-parts/content/single.php or template-parts/footer/bottom-bar.php. The theme looks in the child theme first.

Hooks instead of copies

Copied templates don’t receive our fixes, so prefer hooks where you can. Terrifico has actions before and after the header, main content, each post, the entry content, the sidebar and the footer (for example terrifico_header_before and terrifico_footer_after), and filters for its options and dynamic CSS such as terrifico_option_defaults and terrifico_dynamic_css.

Back to top