![]() Step 1: A Theme FolderĮvery theme for WordPress needs its own folder. A Classic Child Theme only needs a few things to get up and running: a theme folder, a CSS file, and a screenshot file. We’ll name this Classic Child Theme “ M圜hildTheme“. You are going to create a Classic Child Theme of the default WordPress theme Twenty Seventeen. If something breaks, you can simply delete or fix the offending file in the Classic Child Theme folder. The Classic Child Theme can also override or add functionality to the Parent Theme.Ī Classic Child Theme loads first, before the Parent, and only contains overrides and additions to the Parent Theme.Īll of your CSS, templates, images, and other files are kept in the Classic Child Theme’s folder while the original Parent Theme’s files are left intact.The Classic Child Theme overrides selected design elements and otherwise falls back to the Parent.So how do you safely customize a WordPress theme? Create a Classic Child Theme that is a “ child” of another theme (the Parent Theme). You may inadvertently remove elements that WordPress and WordPress plugins look for in a theme, so they no longer work. WordPress and WordPress Plugins may not work with theme hacks.If you edit theme files directly and make a mistake that cannot be undone, you are stuck with a broken theme. Similarly, when you update a plugin, the update will overwrite any edits you’ve made. If you update a modified theme, the update will overwrite all customizations. *Exception: starter themes that have been intentionally created by theme builders for you to modify. The #1 Rule of WordPress development is to never directly modify WordPress files. When the Parent Theme is updated, your changes in the Classic Child Theme will be preserved. How do you prevent this from happening? By using a Classic Child Theme! A Classic Child Theme is a theme that overrides and adds elements to another theme (the “Parent” theme) without touching any of the Parent Theme’s code. Many designers have learned this lesson the hard way. After the next theme update, they are horrified to discover that the update completely erased all of their modifications. After a little investigation, they discover where the theme files live, then directly edit the files. One of the first things front-end designers want to do is modify the design of an existing WordPress theme. Welcome to Classic Child Themes! Today, you are going to learn how to make a Classic Child Theme for WordPress. Lesson Outline Introduction: What is a Child Theme The preferred answers to the screening questions is “yes.” Participants who reply “no” to all 4 questions may not be ready for this lesson.For more information on how to install WordPress locally, please visit our Teacher Resources page. ![]() Set some time aside before class to assist students with installing WordPress locally if they need it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |