My journey to create an Archives page in WordPress has been a lot more challenging than I had first anticipated. I’m far from being a PHP or HTML expert — though I know a couple of things — so I couldn’t understand why the N4R Most Commented Posts plug-in wouldn’t work within a WordPress Page. Fumbling around Google, I discovered that I couldn’t use PHP call tags within a Page or a Post. Those could only be used within page templates like those used for your sidebar, header, and main page. This may sound obvious to some gurus out there, but it was news to me.
More fumbling around ensued. Spud Oregon of Nice4Rice told me that I had to create a new page template. I didn’t completely understand what that meant, but I proceeded anyways. I then asked John Chow for help and he said, “WordPress makes the archives page for you.” He told me to go the “Write Page”, er, page and then go to the page template pull-down from the right side. I told him it wasn’t there. He figured that whoever designed my WordPress theme forgot to include it. I furled my eyebrows in confusion and disgust.
I eventually came across this page that taught me how to create an Archive page. Finally! In a nutshell, what I did was create a copy of the page.php file found within my WordPress theme, rename this new file page-archive.php, and insert some code in there to make the magic happen. Basically, you leave the header, footer, and sidebar stuff alone within the page-archive.php file, but you plunk in the PHP stuff you want in the “content” portion. Suddenly, the page template pull-down that John was describing appeared before me.
Success! Awesome! I got the N4R Most Commented Posts plug-in to work! Now that I created a proper Archives page, I suddenly felt that just the monthly links were insufficient and that’s when I found the Smart Archives plug-in by Justin Blanton. You can see this archive system — which links to every year, every month, and every post you’ve ever written — in action through the link above. On a related note, I have now removed the monthly links from the sidebar as they have now become obsolete. The category listings (previously called “tags”) are still there though.
The downside to all of this work is that I got very little paid work done today. You know, the stuff associated with my freelance writing business. At least I finally got this monkey off my back.
@Michael: I’m glad Search-This could help you with the Archives page. Perhaps we earned a spot in your blogroll? 🙂 Don’t be a stranger to Search-This, there’s plenty more good info where that came from!
cheers,
mark
Great to see you got your archives page together. That smart archives plug-in looks good. I might have to try that for myself. Oh, and thanks for using the most commented posts plug-in! 🙂
Great page. Going to have to do this myself.
Ditto. Looks pretty cool.
Definitely will do this too, great idea Michael
Glad you got it figured out. As for the problem you mentioned on my post about archives, it looks like you forgot to remove one of the tags from the original page.php but your new archives seems to work.
I use the narchives (linked in my post) for the search engines but my official archives page uses Live Archives.
I use SRG clean archives from geekwithlaptop.. I did try using Justin Blanton’s one but unfortunately I ran into problems and I went with this one instead.
I feel your pain; my wife and I took the plunge to getting our own domain and migrating from Blogger to WordPress as our blogs are starting to gain popularity and we needed to do it sooner than later. I’ve been living HTML and PHP for the past week.
I may have to pick this up for review on earsucker….sounds pretty nifty.
Looks pretty cool.
It’d be even cooler if it was divided into monthly pages and used AJAX to go to the next page without refreshing the whole page.
Hi, there!..bd97293b6d1ec7595e7312bc9599b5f7