As creating a subject son in wordpress


As creating a subject son in wordpress

In this tutorial we are going to try to explain as creating a subject son or child theme in wordpress, in addition we will see why he is so useful, and the main problem that are going to us to solve, and that occur at the time of updating the version of a subject or sole

That is a subject son or child-theme?

To create a subject son or child theme is the correct way to personalize the group or subject that we have assets in our Web realised in WordPress, if we want to conserve the changes and to have updated the version of the group that we are using.

When and why to create a subject son in WordPress?

A subject son must be created whenever we are going to realise changes on our active subject that they are not available between the options of personalisation of the own subject (accessible by means of the menu of back end: to apariencia->personalizar). That is to say, when we are going to publish the styles or the archives that compose the group as for example style.css, functions.php, header.php, footer.php etc.

Why? Mainly because we can publish all those archives directly, to leave it to everything to our taste and the day that we update the version of the subject we will lose all the changes. If that is truth that we can deactivate the notifications of update not to fall in the error to update, if we are conscious than it entails, but is not the correct solution since it is not good for having a subject of wordpress with an old version

As creating our subject son in wordpress.

Now that already we know so that it serves and the misfortune that can avoid to us we are going to see as we created it:

1 To create the subject son

In order to have our Web online we must have contracted a lodging, then we must accede to the Control Panel with the name of user and the password who have provided themselves to us

Although in the majority of hosting we have access to the archives of our website, is far better to accede through a client FTP as the program Filezilla . In order to accede with, we must look for in our Control Panel our data of accesso FTP: user, password, servant and port, and with them to form the access in filezilla.

Perhaps once we have acceded, we will see the folders that compose our Web, following each hosting we are with different structures in which we can see folders as €˜webspace€™, €˜httpdocs€™, €˜€™ etc. within them estaran lodged the archives of our Web and that we can identify because we will find archives among others the folders €˜wp-content€™, €˜wp-admin€™ and €˜wp-includes€™. Apartir of we will follow the route here:


Here there is a folder by each subject that we have installed in wordpress.

We create a new folder with the name that we want, good reputation can be €˜nombreTemaPadre-son€™

We will create a called file style with extension css: €˜style.css€™, and that must contain the following code, that we will have to personalize following the name of our subject father. And we will raise it this folder.

We have already created our subject son, only has left to activate it. For it in ours back end or panel of administration of wordpress (writing-desk), we will accede to in menu a:

Appearance Subjects

Here we will see as it will appear as if a subject anyone was our subject son just created. It only lacks to activate it.

Once activated already we can begin to personalize style.css of our subject son.

2 functions.php

The file functions.php is another file that personalizes of very common way by means of a subject son or child theme. To difrencia of other archives php as we see next, this does not sobrewrite the original one but it adds to him what we write within. The way to prepare it so that it works is a file that only contendra a code opening php:

3 To personalize archives php

In addition to the styles and functions.php, we can personalize the archives php, this time is sobrewritten the original one with the content of the file that we raise the son. So that this has effect must have the same name that the original one and to respect the route that has in the subject father.

For example if necesitariamos to modify a file of the group father who is in the following location:


We create a folder within the subject son with the same name and within her a file with same name and extension so that this on the original one writes:


On the author

Administrator Mtpanorama

    It leaves a commentary