Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] How To Create A Tag Cloud Page (http://forum.bytesforall.com/showthread.php?t=2020)

fromtheranks Jun 11, 2009 05:10 PM

[SOLVED] How To Create A Tag Cloud Page
 
I've been wanting to create a Tag Cloud Page for a while -- I have other uses for my side-bars -- without resorting to plugins. This was on my To-Do list for today so, with the help of a number of answers given to others by Flynn, via replies in various locations, and with some research in the WordPress Codex, I have come up with an approach for creating such a page. This is somewhat detailed so bear with me (though it is actually fairly straightforward):

Step 1:
Copy index.php (in ..\themes\atahualpa333) and paste it back into this folder, then rename it to the tag cloud name of your choice. I called mine (cleverly enough) tagcloud.php.

Step 2:
At the very top of your tagcloud.php file, before anything else, add this code (use your tag cloud page title, if it is different):

Code:

<!-- included 6/11/09 by DPH to create new template name -->
<?php
/*
Template Name: Tag Cloud
*/
?>

Note: I left the comment line in there as a demo of the style that I found works best for me, I don't have to be quite so careful where and how I put it (as I discovered yesterday to my chagrin when using Flynn's style).

Step 3:
For default tag cloud settings add the following code, what is in red only, exactly here on a line after the "endwhile; ?>":

Code:

<?php // END of the LOOP
endwhile; ?>
       
<!-- modified by DPH 6/11/09 to add wp_tag_cloud template tag; doesn't seem to need to be "in the loop" -->
<?php wp_tag_cloud(); ?>


Step 4:
So that the Byline doesn't show up on the Tag Cloud page, in your tagcloud.php either delete the following line or remark it out (I prefer remarking out personally):

Code:

<?php bfa_post_byline(); // Post Byline: To edit the output, see functions/bfa_post_parts.php ?>
Note: changing code in this file does not affect index.php or any of the rest of the theme.

Step 5:
Go to the WP Admin Dashboad, go to "Pages" and create a new page entitled "Tag Cloud" or whatever works for you -- the title is not critical. I simply called mine: "Tag Cloud".

If you wish to have some explanatory text under the Page title, add it. The tag cloud will display below your text.

If you don't wish to publish the page yet, change the Status to Pending Review so you can save the page because you need to get to "Quick Edit".

In Quick Edit find and go to the Template field. The dropdown list will (if you haven't typo'd in your php file) show your new template. Select this. Disable Allow Comments and Allow Pings while you're at it (unless you wish comments or pings). Then do an Update Page.

Step 6:
Go to your site and, if all is well, you will see the "Tag Cloud" tab on the Page Menu Bar. When you click on this you will see the Page Title and your tag cloud below it.

Step 7:
If you wish to "tweak" the style of your tag cloud see Flynn's reply at: http://forum.bytesforall.com/showthr...t=wp_tag_cloud.

A sample I played with, to learn how the parameters work, is:

Code:

<?php wp_tag_cloud('smallest=10&largest=20&format=list'); ?>
I hope this helps. :)

P.S. Major kudos to Flynn for creating such a flexible theme!

fromtheranks Jun 18, 2009 02:19 PM

Hi.

I just ran into a tiny glitch on my tagcloud.php page (as described below).

It works great ... except that it doesn't hold the "background color: hover" color on the page menu bar tab once the page is selected ... as the other tabs do.

Is there a way to fix this? With a CSS insert or something like that?

Thanks in advance.

fromtheranks Jun 23, 2009 03:26 PM

Never mind. :o I must not have cleared the cache during my original testing, because I just went back to work on my Tag Cloud page and hover works perfectly after the page is selected. :)

P.S. Firefox's Firebug tool is a great tool for debugging ... even non-existent issues. :)


All times are GMT -6. The time now is 03:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.