Book Image

Learn to Create WordPress Themes by Building 5 Projects

By : Eduonix Learning Solutions
Book Image

Learn to Create WordPress Themes by Building 5 Projects

By: Eduonix Learning Solutions

Overview of this book

WordPress has emerged as a powerful, easy-to-use tool to design attractive, engaging websites. Themes play a big role in making WordPress as popular as it is today, and having an eye-catching, fully-functional theme could separate your website from the rest! This book will help you take your first steps in the WordPress theme development process, with 5 different projects centered around creating unique and responsive WordPress themes. Start with creating a simple WordPress theme using HTML5, CSS, and PHP. Then, you will move on to incorporate different APIs, widgets, and tools such as Bootstrap and jQuery to create more dynamic and highly-functional themes. Whether you want to create a photo gallery theme, a highly customizable e-commerce theme, or a theme designed to suit a particular business, this book will teach you everything you need to know. By the end of this highly interactive book, you will have the required mastery to develop WordPress themes from scratch.
Table of Contents (6 chapters)

Creating custom archive pages

Let's create custom archive pages. Now if we click on one of the categories, it'll take us to a category archive.

If we click on admin, the username, it will take us to the author archive. There are others as well. We can also have archives by dates, we can have them by tags, and so on. So let's go into our themes folder. We will create a new file and save that as archive.php and open that up.

Now if we go back and click on a category, you can see it's blank because it's looking at the archive.php page. We will copy what's in the index.php page and paste that in archive.php.

I want these pages to be much more simple. We don't need the meta, and we don't need the image; pretty much just the title and the date is all that we want. So let's go to where we have the <article> tag and get rid of the whole...