Categories
WordPress

WordPress Template Tags Lab Exercise

If you need help with any part of this exercise, consult the WordPress Codex documentation on template tags: https://codex.wordpress.org/Template_Tags

REVIEW TASKS

Make a new WordPress site in a testing environment. Download the sample content. 

Into that new site, import the content. If you’re not at Langara, click “Import Attachments.” If you are at Langara, you will have to import each post’s Feature Image manually.

When importing the content, import the author too (kevinmc). Make the necessary changes so that half of the posts are written by you, and half by me.

Delete the sample post and page. Install the Underscores starter theme, and make it the active theme.

You will not need to use a grid stylesheet in this exercise, nor do you need to change the reset stylesheet to normalize. 

Set up the site so that:

– the header and footer areas span the entire width of the page and have a background color that makes that clear.

– the main content area spans 90% of the page, is centered, and is never more than 1000px

– feature images of each guitar appear above the title of each story on the index page

– index page feature images are 620px wide at their maximum. Do not set this size in CSS.

– feature images show up on search result pages, at a maximum size of 400px. Do not set this size in CSS.

– on the index page, the full content of each post is not shown. Rather, the excerpt is shown.

– on the index page, the date of each post is not shown.

– on the full story page (i.e. when a story is read on its own), the appropriate template outputs the full size feature image, again above the title of the article.

– the header has the menu called “main menu” (not the default one) active

– the footer displays a menu with links to Gibson (https://gibson.com) & Fender (https://fender.com).

NEW TASKS

For these tasks, definitely consult the codex page listed above.

Edit the appropriate templates such that:

– on the index page, under the title of each story, the appropriate template outputs the author’s name, preceded by the phrase “Article by” (with an extra space, too).

– on the full story page, after the line that says “This entry was posted in…”, the following line appears: “Other articles by” followed by a link to all that particular author’s posts.

– when the site is listing all the articles you wrote, change the background color of the header and footer. When I am the author, leave it at the default colors you set earlier.