Back to blog
Wordpress November 13, 2025 2 min read

How to create a child theme and a custom page in WordPress

This tutorial shows how to create a simple child theme and add a custom page that loads only the essentials. Ideal for using plain HTML while keeping your active plugins working.

1. Create the Child Theme

  • Access /wp-content/themes/ via FTP or File Manager.
  • Create a new folder called your-child-theme.
  • Inside it, create a file called style.css with the content below:
/*
Theme Name: Seu Tema Filho
Template: nome-do-tema-pai
*/

Replace parent-theme-name with the folder name of your main theme (e.g., astra, twentytwentyfour).

Now, create a functions.php file with the following content:

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

2. Activate the Child Theme

  • Go to Appearance > Themes in the WordPress dashboard.
  • Activate the newly created child theme.

3. Create a Custom Page with Your Own HTML

<?php
/* Template Name: HTML Simples */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php wp_title(); ?></title>

    <?php
    // Carrega os estilos e scripts essenciais (de plugins e do tema)
    wp_head();
    ?>
</head>
<body <?php body_class(); ?>>

    <main>
        <h1>Minha Página com HTML Simples</h1>
        <p>Esse conteúdo é renderizado com um template personalizado.</p>
    </main>

    <?php
    // Carrega scripts do WordPress e dos plugins
    wp_footer();
    ?>
</body>
</html>
  • In the child theme folder, create the file page-htmlsimples.php.
  • Insert the following code:

4. Create the Page in WordPress with That Layout

  • In the dashboard, go to Pages > Add New.
  • Give the page a name, such as "HTML Page."
  • In the page settings tab, select the template called HTML Simples.
  • Publish the page normally.

Done. Your page will use clean HTML with only the essential scripts from WordPress and your active plugins.

Put it into practice with AI Web Push.

100% automatic push notifications with AI: more recurring traffic for your site.