The verb to enqueue comes from the French language. It means to put something into a lineup. In WordPress the wp_enqueue_style() and wp_enqueue_script() functions are used to manage the loading of external resources like scripts and stylesheets. Why do we do things this way? Imagine if you have a theme that requires a dependency (some […]
Category: WordPress Templates
For this exercise, please download and install this Duplicator archive package into a new empty database. Installed with this package is a plugin called Show Current Template. That will add information on the ADMIN bar when you’re logged in and viewing pages in the browser, showing what template files are involved in the creation of the […]
Introduction to the Functions File A very important file in any WordPress theme is functions.php. In it, we typically do things like the following: enable theme feature support, like feature images, custom logos, block editor styles, etc enable certain gutenberg block features such as wide alignment or full alignment, etc notify (register) WordPress about how many […]
The main focus of this exercise will be the use of JavaScript in WordPress. Setup First, please download the starter package. When you unzip the file, you will find a Duplicator installer and archive. Make a new database and install the site into your testing environment (most likely MAMP). Make a new SASS-based theme called […]
In this exercise, you will use custom fields and custom post types to make a restaurant website. The aim is to create a theme that gives a site owner a more intuitive UI with which to manage his or her content. The first parts of the exercise will focus on setting up and outputting the […]
If you need to output the title of an archive in a WordPress theme, you could use functions like single_cat_title(), single_tag_title(), etc. The trouble, however, is that they’re limited to the type of archive (category, tag, etc) listed in the function name itself. A more versatile approach is to use the_archive_title function. It will work on any […]
Initial Setup Download Duplicator Site For this exercise, please download the starter files and the screenshots collection, if I don’t distribute them in class. These are big files, so the download might be a bit longer than that for most of the files on this site. Most, but not all, of the screenshots for the […]
Open _posts-and-pages.scss from the SITE/PRIMARY folder. A big chunk of your home page styling can be taken care of if you explicitly define your grid columns and rows–particularly the rows. If you define the rows, the 1/-1 syntax to make the section-titles take the full column will also work with rows. Here are some starting […]
If we look at the screenshots, we see that we’ve got a few more things we need to do with the header and the footer of the site. First of all, each has a background image, or two. Hopefully, at the start of this exercise, you downloaded the background images and put them the theme […]
Original Task Content Generation Front Page Sectioning (very detailed) Content Template Part (Meta Data & Gravatar) Type Styling (more work needed) Layout : turn into a task. It isn’t done. One line in a file started. Add bg images.