Categories
WordPress Templates

WordPress Theming Links

The Basics To build an understanding of how WordPress themes work, start at the WordPress Theme Handbook, Chapter Two. This will give you a understanding of Template Files Post Types The Template Hierarchy The Loop Template Tags Theme Functions Including CSS & JavaScript Conditional Tags Categories & Tags Template Hierarchy Links The template hierarchy is one […]

Categories
WordPress Templates

Your First WordPress Loop

In your underscores starter theme, create a new file called front-page.php. Into it, copy the following code. You can remove anything that was put there by default by your editing program (if anything). Now go to the front page of your site. What we are going to do is build on this loop in class […]

Categories
WordPress Templates

Using NetBeans & SASS With WordPress

If you want to know how to install SASS and/or Netbeans on your own computer, consult this document. Set Up Your WordPress Testing Environment Depending on what class we are in, I may give you a Duplicator archive and installer file and get you to install a sample WordPress installation, or I might get you to […]

Categories
WordPress WordPress Templates

Useful WordPress Snippets: Gravatars

AUTHORS To display author name as a link to the posts by that author:<?php the_author_posts_link() ?> To display author name, non-linked:<?php the_author(); ?> To GET an AVATAR for your author, sized to 96px by 96px<?php echo get_avatar( get_the_author_meta(’email’), ’96’ ); ?> To GET an AVATAR for your author, wrapped in a link to the AUTHOR […]

Categories
WordPress Templates

About The Loop

The first three lines set up the logic: <?php if ( have_posts() ) : ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> Other themes will express this as a single line: <?php if ( have_posts() ) : while ( have_posts()): the_post(); ?> Regardless of these phrasing differences, […]

Categories
WordPress Templates

The WordPress Loop

Without a doubt, the fundamental part of the WordPress system is the loop. The loop is the code that pulls information from your site’s database. In a default WordPress installation, for example, when your front page loads, the loop asks the database the following questions: Do you have any posts to display? If so, can you […]

Categories
WordPress Templates

WordPress: How to Add Menus to a Theme That Doesn’t Support Them

Many starter themes, or older themes, do not natively support custom menus. In the Appearance > Menus, the top right pane is called Theme Locations. you will be informed there if the theme doesn’t support menus. To add menu support to a theme is a three-step process: Add the menu capability to functions.php Add the […]