Categories
WordPress Templates

WordPress Theming Exercise: The Eatery Restaurant pt 4

Another Custom Post Type: Meal Menus Go to the CPT UI part of the Dashboard and choose Add / Edit Post Types. For the slug, use meal_menu. Fill in the Plural and Singular labels (with Meal Menus and Meal Menu, respectively) and then click the Populate additional labels based on chosen labels link. In those […]

Categories
WordPress Templates

WordPress Theming Exercise: The Eatery Restaurant pt 3

A New Staff Member In the Staff Members section of the Dashboard Sidebar, click Add New. You can also do this from the New menu in the Admin toolbar. You will then see this screen. It looks like a traditional post, sort of, but not… For the first employee use these values: Title: Doris Shutt […]

Categories
WordPress Templates

WordPress Theming Exercise: The Eatery Restaurant pt 2

Theory: Custom Post Types WordPress has two main kinds of content: posts and pages. Posts are organized with tags and categories. They typically have titles, content, excerpts, feature images, etc. However, much content doesn’t really “fit” that method of organizing. Fortunately, it is possible to create other kinds of post types through a feature called […]

Categories
WordPress Templates

Multiple Loops in WordPress 2020

About Custom Loops This will be one of the more 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 […]

Categories
WordPress Templates

Icon Fonts with WP_Nav_Menu()

HIDING THE LINK TEXT:With wp_nav_menu, you can specify content to go before and after each link in the menu. Here “link_before” and “link_after” are being used to wrap the link text in a span that hides it while still remaining accessible. INSERTING THE ICONS:Then we can use CSS BEFORE pseudo-class selectors in order to inject […]

Categories
WordPress WordPress Templates

WordPress Menu Exercise 2020 pt 3: Enqueuing Scripts

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 […]

Categories
WordPress Templates

WordPress Menu Exercise 2020 pt 2: Enqueuing Styles and Scripts

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 […]

Categories
WordPress WordPress Templates

WordPress Menu Exercise 2020

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 […]

Categories
WordPress Templates

WordPress Bare Bones Theming Exercise: functions.php

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 […]

Categories
WordPress WordPress Templates

WordPress JavaScript Exercise: Mais Henri

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 […]