Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn to Create WordPress Themes by Building 5 Projects

You're reading from   Learn to Create WordPress Themes by Building 5 Projects Master the fundamentals of WordPress theme development and create attractive WordPress themes from scratch

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781787286641
Length 458 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Eduonix Learning Solutions Eduonix Learning Solutions
Author Profile Icon Eduonix Learning Solutions
Eduonix Learning Solutions
Arrow right icon
View More author details
Toc

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...

You have been reading a chapter from
Learn to Create WordPress Themes by Building 5 Projects
Published in: Dec 2017
Publisher: Packt
ISBN-13: 9781787286641
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime