Displaying a list of links to the latest custom post type posts


show more Displaying a list of links to the latest custom post type posts provides you with in-depth training on Design. Taught by Morten Rand-Hendriksen as part of the Create an Online Portfolio with WordPress show less
please wait ...

Displaying a list of links to the latest custom post type posts

In our footer, we now have three areas that we can put content into. You can see them down here at the bottom. Recent Recipes, Recent Photos, and Recent Videos. Now, we want to add lists that display the title of and links to the five most recent items under each of these three custom post types. We're going to do that by creating a custom loop using a custom query. In our sidebar-footer.php file, we already have our dummy content set up. It's set up here under the unordered list where you can see there is an unordered list that has a list item and then inside the list item, there is an h3 header that has a link and the actual title of the post.

This is the code we'll keep using. What we need to do now is wrap this list item in a loop that goes to WordPress and says give me the five most recent items and then display them one at a time. In the code-snippets file, I've created this custom loop, but I've separated it from the sidebar content. The reason for that is you c...

Displaying a list of links to the latest custom post type posts
Video duration: 5m 5s 3h 13m Advanced

Viewers:

Displaying a list of links to the latest custom post type posts provides you with in-depth training on Design. Taught by Morten Rand-Hendriksen as part of the Create an Online Portfolio with WordPress

Subjects:
Design Web
Software:
WordPress
Author:
please wait ...