It is often said that the first rule in data security is to trust no one. From the WordPress developer handbook: It’s best to do the output validation as late as possible, ideally as it’s being outputted, as opposed to further up in your script. This way you can always be sure that your data […]
Category: WordPress
WordPress Basics Lab Exercise
Some of these “review” tasks we might not have done in class yet, or they might not all have been covered by the videos I’ve assigned. If that’s the case, think of those parts of the task as “review while figuring out” exercises. First, download these images. You will use these images in a couple […]
Enqueuing for Scripts Enqueueing scripts (or local stylesheets), it is a bit more complicated, but it’s learnable. Underneath the last wp_enqueue_style function, type wp_enqueue and select wp_enqueue_script from the menu that shows up (thank you, WordPress Snippets extension). The following helpful boilerplate is output, showing us what arguments are expected by the function: The values […]
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 […]
In this exercise, you will download and configure a free WordPress theme, and some plugins. You are welcome to use the Internet or your notes. Install the Project Site First please download this duplicator package [updated Jan 2022]. Also, please download the screenshots package. Now, install this downloaded site into your MAMP testing environment. If […]
Below are some of the Visual Studio Code Extensions I use and recommend: Live Server: automatically reloads browser when html or css files are saved Rainbow Brackets: colors bracket pairs. Very useful in JavaScript StyleLint: error checking for CSS File Utils: adds file management functionality (duplicate, rename, move, etc) VSCode-Random: generated random data. CSS Navigation: for searching […]
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 […]
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 […]
Site Set Up First, please download these files. this duplicator archive WP site the graphics files for the site the screenshots Install the site in a new database in your testing environment. As part of the Duplicator site install, create a new admin account. In that process, include your real First and Last Name. For […]
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 […]