The stylesheet for the parent theme is already set up and enqueued in this child theme, as described in the Child Themes lesson. Open the child theme folder, find the functions.php file, and open it in a text editor. View the files of your WordPress installation, and navigate to /wp-content/themes/ Notice that there is a folder for the parent theme, twentyseventeen, and one for the child theme, mychildtheme. Now you will change it and see how that affects the site’s appearance. Activate the child theme, then view your site and notice how it looks with this theme. After you’ve ensured you’ve got the Twenty Seventeen theme loaded, download and install the child theme called M圜hildTheme: Download the zip file here, or from the Assets list above. If it is not, please install it now by clicking on the plus sign in the box labeled, Add New Theme. If this is a fresh install, the Twenty Seventeen theme should already be activated on the site. In the dashboard menu on the left of your screen, select Appearance, then Themes. Log in to your WordPress admin dashboard. For more on this, consult the lesson plan on building child themes, Install and activate the parent and child themes Using a child theme allows you to freely experiment without altering the parent theme. It is considered a best practice to use a child theme since parent themes will receive periodic updates the theme’s author and the updates will overwrite any changes or customizations made directly in a parent theme. You will be working with a child theme of the Twenty Seventeen 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 Local Installation lesson plan. Set some time aside before class to assist students with installing WordPress locally if they need it. It is easiest for students to work on a locally installed copy of WordPress.Performing a live demo while teaching the steps is crucial to having the material “click” for students.Will you have a locally or remotely hosted sandbox WordPress site to use during class?.Do you feel comfortable using a text editor to edit code?.Do you have at least a basic knowledge of HTML/CSS?.Are you familiar with installing and activating themes via the WordPress Dashboard?.Child theme “M圜hildTheme” (download zip file).Ability to edit files with a text editor.Understanding of how folders and files are structured.Basic knowledge of installing and activating WordPress themes.You will be better equipped to work through this lesson if you have experience in and familiarity with: Correctly include and load your own scripts and styles such that WordPress manages them efficiently.Tap into WordPress’ system for managing myriad scripts and styles.ObjectivesĪt the end of this lesson, you will be able to: In this lesson, we will be customizing a theme, but what you will learn is also applicable to building plugins. Note: The method for adding scripts and styles to WordPress is essentially the same for both plugins and themes. For this lesson, the goal is to simply become familiar with enqueueing so you can complete it in its most basic form. Additional and deeper PHP learning is beyond the lesson’s scope so we encourage you to look at other resources such as the official PHP manual. Don’t worry about being fluent in PHP programming the information you need for this lesson is provided. Enqueueing is used for both scripts and styles and means we must access and alter the functions.php file that comes with your WordPress installation. The method for adding your own scripts and styles to your theme is called enqueueing. WordPress has built-in systems to keep track of all the scripts and styles, keep them from conflicting with each other, and use them in the correct order. Many scripts and styles are included in WordPress core others are added by plugins or themes. At its core, WordPress already manages a long list of scripts and styles to produce a functioning web page. The server-side language PHP does the heavy lifting behind the scenes to provide data to the browser. Client-side languages like HTML, CSS, JavaScript and jQuery produce a rich and seemingly limitless user experience. WordPress relies on several programming languages to provide a solid, yet extensible, framework to build upon.
0 Comments
Leave a Reply. |