0

I have read on codewordpress about this issue. In the article "A WordPress child theme is a theme that inherits the functionality of another theme". And then on stylesheet use import style from parent style @import url("../twentythirteen/style.css"); Lets take example with twenty thirteen.

So I have current conclusion that is good system for fast & simple development. We no need build from scratch and no need update in future because parent update->child also updated.

But yesterday, I found that this theme claim is child from twenty thirteen. I check it, but I don't see any import style to twenty thirteen and all php file is all there (I create child theme and just php file from twenty thirteen that have in my theme as example function.php, header, footer, and content-_*).

Any wrong with my conclusion about child theme?

One other part of my question and for help me for mistake in future. If we use child theme and override some function and style on twenty thirteen. Does in future (when parent theme updated) the function and style still used?? For example:

#article {code override} Is this id/class will be still used?

function foo(){all code} Is this function (example) in functions.php will be still used?

I hope anyone can explained more to me so It confused will be done. Thanks

1
  • 2
    I don't know what to say that isn't said in the Codex.
    – s_ha_dum
    Commented Feb 15, 2014 at 1:54

3 Answers 3

0

The theme you're talking about isn't a child theme. If you read the description, you'll see it's "based on the awesome TwentyThirteen." This just means it's inspired by and probably borrows code from TwentyThirteen, but it's not a child theme.

As for a real parent-child theme relationship, the goal is that when the parent updates you just reap the benefit of the update. However, if the parent theme changes its styling or the IDs it uses for various elements, you might need to update the related code in your child theme to match.

Most parent themes will retain their IDs (i.e. #article), but there's no guarantee.

1
  • Yes the if child theme no need update thats my goal so I can make website just one time of one client no need update (latest web has be hacked by someone because i never update and any risk security)... Do you have any idea?, I mean the best parent theme that no update class css/some function? For recent I love twenty thirteen.
    – Lena Queen
    Commented Feb 15, 2014 at 14:51
0

This is an example of a child theme:

http://wordpress.org/themes/2013-blue

Notice that we indicate it on WordPress.org by having a big "Parent Theme" button, pointing to the parent theme.

0

Child theme inherits all the functionality and styling of it's parent theme. If you are using child theme and a theme update is applied your changes won't be lost or overwitten You can quickly create child theme for any theme, just follow the steps given below:

  1. Create a folder and name it exactly your theme name; append -child in the name. e.g. creating child theme for twentysixteen theme would be called twentysixteen-child this folder should sit beside parent theme under wp-content/themes/
  2. Your child theme should have three files - style.css ,functions.php ,screenshot.png
  3. In functions.php file you can override parent theme functions.
  4. In style.css file you can override parent theme CSS code.
  5. If you want to change header design then you have to override header.php file. For this copy header.php file of your parent theme and paste it inside your child theme folder. Now, you can modify the child theme header file as per your requirements.
  6. Similarly, you can also override footer.php file in your child theme.

For more info have a look over below thread- https://codex.wordpress.org/Child_Themes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.