PHPackages                             sevenphp/wordpress-themesample-child - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sevenphp/wordpress-themesample-child

ActiveWordpress-theme[Utility &amp; Helpers](/categories/utility)

sevenphp/wordpress-themesample-child
====================================

A sample wordpress child theme skeleton to show how to implement a child theme with best practice.

15PHP

Since Nov 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/wkhayrattee/wordpress-themesample-child)[ Packagist](https://packagist.org/packages/sevenphp/wordpress-themesample-child)[ RSS](/packages/sevenphp-wordpress-themesample-child/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

INTRO
=====

[](#intro)

This is to serve as a sample guide when I build child themes.

REF:

- [https://codex.wordpress.org/Child\_Themes](https://codex.wordpress.org/Child_Themes)

STEPS:
------

[](#steps)

1. make sure to append the directory of the child theme with a **'-child'**
2. Should contain at least the following two files:

    ```
     - style.css
     - functions.php

    ```
3. The Stylesheet must begin with the header:

    ```
     /*
       Theme Name: Parent Name Child
       Theme URI: []
       Description: A Child Theme of [Parent Name]
       Author: Wasseem Khayrattee
       Author URI: http://khayrattee.com
       Template: parent-folder-name # should corresponds to the directory name of the parent theme
       Version: a-number--optional

       General comments/License Statement if any.

     */

    ```

- The **style.css** of a child theme will always directly override its counterpart from the parent

4. The **functions.php** is necessary to enqueue styles correctly. Do not use **@import()** in style.css to import parent stylesheet. This is bad practice. So use enqueue.

    ```

    ```

### Overriding things from the Parent functions.php

[](#overriding-things-from-the-parent-functionsphp)

- The **functions.php** of a child theme does **NOT** override its counterpart from the parent
- it is loaded in addition to the parent’s functions.php
- it is loaded in addition to the parent’s functions.php

NOTE:

- We can capitalise on the above by including a function FIRST in the child-theme so that it overrides its counterpart in the parent-theme, **by declaring the function conditionally**

    ```
          if ( ! function_exists( 'theme_special_nav' ) ) {
              function theme_special_nav() {
                  //  Do something.
              }
          }

    ```

### get\_stylesheet\_directory()

[](#get_stylesheet_directory)

Use this when we need to get the current directory path of the child theme. This is because Wordpress always give the path of the current active theme.

Example:

```
        require_once( get_stylesheet_directory() . '/my_included_file.php' );

```

### Others

[](#others)

For **RTL** support and **localisation**, see [https://codex.wordpress.org/Child\_Themes](https://codex.wordpress.org/Child_Themes)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e099126f576980e8508ea28e129bc361755285226ed201053528546aec356aa?d=identicon)[wkhayrattee](/maintainers/wkhayrattee)

---

Top Contributors

[![wkhayrattee](https://avatars.githubusercontent.com/u/7369626?v=4)](https://github.com/wkhayrattee "wkhayrattee (1 commits)")

### Embed Badge

![Health badge](/badges/sevenphp-wordpress-themesample-child/health.svg)

```
[![Health](https://phpackages.com/badges/sevenphp-wordpress-themesample-child/health.svg)](https://phpackages.com/packages/sevenphp-wordpress-themesample-child)
```

###  Alternatives

[woodsandwalker/laravel-countries

Laravel Countries is a bundle for Laravel providing ISO 3166\_2 codes for all countries along with a country model, cast and validation rule.

1011.4k](/packages/woodsandwalker-laravel-countries)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
