(From a cynical search-result-priority aspect, I guess this is good because people may land on the site for anything/everything, but that is just not cool).
I thought there may be a way to place the tag cloud on a single page of the site, but I had trouble finding out how to do that. I'm not code savvy, so I really didn't want to blindly tinker a means myself. By pure chance, I found an awesome post that describes step-by-step how to modify blogger's template code so that the tag cloud widget only shows up on a specific URL of the site.
I'm going to lay out the steps as well:
- Create a page for the tag cloud to show up on. Whatever you name the title as, will become the url extension, so you may want to keep it something simple, like "labels". Make sure to publish the page so that it will take the title as the URL and will show up.
- If you haven't already, add the pages widget to your page layout, so visitors (and you) can easily navigate to the labels page.
- If you haven't already, add the tag cloud or labels cloud widget. The result of this procedure will display the tag cloud widget on only one page of your site, so you may want to position the widget above the posts, so that it will be plainly visible on the target page.
- Go to the template settings. We're going to edit the blogger template. It may be prudent to download the current settings to back it up in case something goes awry.
- Click "Edit HTML". You will see all the code. You need to find the label widget. The code line should look something like:
- <b:widget id='Label1' locked='false' title='Labels' type='Label'>
- You may be able to find it by using the widget dropdown.
- We need to add an if condition into the code so that the widget only displays on a target page. You need to expand to make the entire section visible. There is a nice "...", click it to expand, and expand more if necessary. We need to be able to see a section of code that says <b:includable id='main'>.
- After the includable code, you need to add the conditional code <b:if cond='data:blog.url == "URL"'> . Replace the URL with the URL of your target page created back in the first step.
- This is web-coding, so you need to close the statement. We added it after the includable code, so we need to end it before the includable code ends. Find </b:includable> and add this code before it: </b:if>
- Double check things, the code should basically appear like this:
<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:blog.url == "URL"'>...
...</b:if>
</b:includable>
</b:widget>- Save your template and exit. Now view your blog, and check your labels page. The tag cloud should only appear on that page, and nowhere else on your blog. Celebrate.
I have done the above which has removed it from all the other pages but i cannot see it in the page I want, it has removed it all together. I have checked the URL and all seems to be correct. Do you know what I have done wrong?
ReplyDelete