Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Displaying Content in Custom Places1:56 with Zac Gordon
Most websites display different types of content together on a page. For example, our project homepage displays slides of our project, blog posts, recent projects and testimonials. In this video we will outline the different types of custom content we’ll be adding to our templates.
If you decide to locally install the full demo WordPress site, user the username and password 'treehouse' to login
[How to Build a WordPress Theme: Extending WordPress Template Functionality]
Most websites have more complex page layouts
than just the header, title, main content, sidebar, and footer.
Especially on pages like the homepage, you'll often find different content blocks
of information organized on the page.
If we look, for example, at the original design for our portfolio homepage,
we could see a number of areas of custom content.
We have the slide show, our featured post, our recent post, our recent project,
testimonials, and a number of widgets in our footer.
That's a lot of different types of content coming together in one template.
Before we jump into coding, let's take a look at how this is going to be organized
in terms of what content is being displayed where.
The first section we'll be working with is the featured slider that pulls in posts
from our work post type and make sure that it has the check box
for display on home page checked.
The next section down will be our featured posts.
This will pull in the most recent post that has the category of featured assigned to it.
After that, we have our recent posts.
This will be pulling in the most recent post that is not set to featured
because we don't want to duplicate the content displaying there.
Next, we have our most recent project—which, like the slide show,
is pulling from our work post type—and will just be pulling in the most recent
and displaying it there.
Below that, we have our testimonials which we've worked with,
which will pull in one random testimonial.
At the very bottom of the page, we'll be displaying content using widgets
and dragging and dropping them to the right place.
You need to sign up for Treehouse in order to download course files.Sign up