When I asked my readers what they wanted me to write about, making a page that showed posts with a specific label was the first suggestion I received. When would this come in handy? Well, say you want all of your giveaways to show up on the Giveaway page. Or, you have a daily/weekly post and you’d like all of them to show up on one page (sure, you could just click the label, but having a page is so much cooler!)
Well, here’s the tutorial! Please keep in mind that I am not an expert at HTML coding, but I do test everything out before posting it. Please let me know if you have a problem!
ALWAYS BACK UP YOUR TEMPLATE BEFORE MAKING CHANGES. Seriously, I can’t stress that enough! Usually, I open a Word Doc and copy and paste it there. That way, I know I have the unmarred code in a totally separate place!
- NOTE: Before you start editing, you will need the unique label link. Get it just by going to your blog and clicking on whichever label you want to make the page for, then copying the URL.
- Click the Design link on the Blogger Dashboard, then click Edit HTML Code
- Make sure you click the box that says Expand Widget Templates that’s right above the text box
- Back up your code before making changes
- Press Ctrl + F and search for the following code:
- A few lines under this, you will see a line that only says </b:loop>
- DIRECTLY UNDER THAT, copy and paste the following code:
<b:if cond='data:blog.pageTitle == "Title of Label Page"'>
<li class='selected'><a href=’Label Link' title=’Label Name’>Title of Label Page</a></li>
<li><a href='Label Link' title=’Label Name’>Title of Label Page</a></li>
Change the red parts, and make sure you don’t delete anything else!
Click Preview, and if you see that a new page was created with the correct title, it worked! But you might want to save and click on the tab yourself to make sure the posts show up.
You’re DONE! Wasn’t that easy?
- Please note that this code will make the page for you; you don’t have to make one beforehand!
- I tested out this code with the “Guest Posts” page up top. As you can see, clicking on that tab will show you all posts that have the label “Guest Post”. So it really works!
Please tell me if the code works, and if my directions were easy to follow. I’ve never made a tutorial before, so all feedback helps! Also, if you want to know why this code works and what it does, I can give a very simple explanation if you ask.
Also, if you’re interested in any other tutorials (not limited to Blogger), I would love to make a weekly tutorial post, so tell me what you need to know!
P.S. Feel free to copy or link to this post! Just PLEASE remember to give me credit! I worked hard on this!