Categories
WordPress

Guitar Kitty 2027 Exercise

In this exercise, you will be introduced to five exiting topics which will greatly increase your ability to make complex WordPress-based websites:

  • Making your own full-site editing themes
  • Making Custom Fields
  • Making Custom Post Types
  • Making custom Taxonomies
  • Displaying content conditionally.

First, please download the starter files.

Once this Duplicator package downloads:

  • Unzip the folder and put it into htdocs.
  • Create a new database in phpMyAdmin and install the site into it.
  • Be sure to click Advanced on the first screen of the installation process: this will allow you to create an additional admin account for you to login with.

Follow Along Video Series

Now, follow along with the steps in this video series

After you get through the video series, proceed to the assignment.

The Assignment

In the custom fields for the first four posts in each of the Lovers, Haters, and On The Fence categories, put in some data: give each guitar a price, an owner, a rating, and YouTube url.

You can make up the values, but use real YouTube URLs. They don’t have to be Hello Kitty related, unless you want them to be.

Make sure that approximately half your ratings are less than 5 and half are greater than 5.

Install the Block Visibility Plugin.

You will need to use features of this plugin, and potentially the Meta Field Block plugin, to show or hide the following content.

  • if the price custom field has no value, make sure it is hidden
  • if the guitar rating is five or under, show the sad face, and hide the happy face
  • if the guitar rating if six or over, show the happy face and hide the sad face
  • if the guitar has no rating, hide the whole rating panel

And here is a video describing the behaviour.

This is what your panel should look like (the images below depict a low rating, a high rating, and no rating):

We probably didn’t cover how to show or hide in class, so you might need to ask Google, ChatGPT, Claude or any other resource.

Or you might be able to figure out the task just by poking around in the interface of the Block Visibility and Meta Field Block plugins.

What To Hand In

When you are done, save your theme changes. How to do that is shown in video 27.

Then make a Duplicator package of your site.

Download both files.

Put them in a folder called GuitarKitty2027-YourName.

ZIP that folder.

Hand it in to our class hand-in folder.