This exercise will demonstrate a number of important WordPress features, including the WordPress template hierarchy common template tags the loop conditions in WordPress get_template_part We will take a simplified approach, in order to get the broadest sense of how WordPress themes work and not get bogged down in too many details. Some Sample Content First […]
Category: WordPress Templates
Jazz Icons 2018
Please download the Duplicator archive for this exercise, then download the screenshots package. The Duplicator archive contains all the site content, including the menus. It also includes an UNDERSCORES starter theme with two modifications: Post thumbnails will already have links to their respective posts (you will still need to put the_post_thumbnail() into the appropriate theme […]
Hopefully this exercise has given you some ideas about how to build WordPress templates. A number of things, of course, remain to do. There is a social menu, so please figure out how to add font-awesome icon fonts to each of the social links, while hiding the link text with underscores’ screen-reader-text class. The wordpress […]
If the conditional workout from the previous part of the exercise is confusing, remember that you could also have just made another template part to be called from the SINGLE.PHP template file. But getting comfortable with conditions gives you a lot of power, so it’s definitely worth it to practice using them. Anyway, in this […]
So we have constructed a front-page template that outputs our content in two defined loops rather than one “reverse-chronological” default loop. But when we test, we see that too much content is being output in each article. If we look at the screenshot on the page about the front-page template, we will see that we […]
Now let’s turn to the complex footer we have in the screenshot. This is actually quite easy. I have installed a highly-regarded FORMS plugin called Ninja Forms. That is why you see a FORMS section in the Dashboard (just below the COMMENTS menu item in the dashboard). Using a WordPress feature called Shortcodes, we will […]
Look at your home page. You will see the header and footer and sidebar area, hopefully well styled. Look at the rest of the content on the page. The default home page loop outputs the title, the posting date, all the content, the categories and the tags, etc. Each article is essentially unstyled, so the […]
In this exercise, we will make an Underscores-based WordPress site for the Imaginary Film Festival. IFF Home Page (click for full size) I am not going to cover every single styling component of the exercise. Please, however, style the site as close a possible to how it is done in the screenshots The text in this […]
Multiple Loops in WordPress
About Custom Loops This will likely be the most complex topic we cover in this class, but knowing how to make multiple loops in a single template file gives you some amazing abilities. The default loop gives you posts in order of most recent to least recent. However, with custom loops, we can select from a […]
The verb to enqueue comes from the French language. It means to add 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 […]