WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#4610 closed enhancement (worksforme)

Default theme (Kubrick): add the tag cloud for WP 2.3

Reported by: albaran Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords: tested needs-patch
Focuses: Cc:

Description

Add the tag cloud at the beginning of the sidebar.

Add in sidebar.php:

<li>
	<?php wp_tag_cloud(); ?>
</li>

Do it, it's magic!

Attachments (2)

sidebar_tag_cloud.patch (434 bytes) - added by albaran 7 years ago.
display tag cloud in the default theme
sidebar_widget_tag_cloud.patch (1.1 KB) - added by albaran 7 years ago.
add tag cloud in widgets

Download all attachments as: .zip

Change History (11)

comment:1 Nazgul7 years ago

  • Milestone set to 2.3 (trunk)
  • Version set to 2.3

comment:2 JeremyVisser7 years ago

  • Component changed from Administration to Template

Not at the beginning. Below the search box, at least.

comment:3 albaran7 years ago

The tag cloud is a search device for posts. Before or after the search box is OK.

Must be available in widgets if not in the first position.

comment:4 JeremyVisser7 years ago

Oh, and if you put it into the static sidebar, you'll want a widget for it as well. The following is in plugin form, but I'm sure it could be adapted in 60 seconds to be built-in to widgets.php.

<?php
/*
        Plugin Name: Tag Cloud
        Plugin Author: Jeremy Visser
        Description: A sidebar widget which displays a tag cloud.
*/

function jv_tag_cloud_widget($args) {
        extract($args);

        echo $before_widget;
        echo $before_title . 'Tags' . $after_title;

        echo '<div class="tag-cloud">';
        wp_tag_cloud('smallest=8&largest=22');
        echo '</div>';

        echo $after_widget;
}

function jv_tag_cloud_init() {
        register_sidebar_widget('Tag Cloud', 'jv_tag_cloud_widget');
}

add_action('init', 'jv_tag_cloud_init');

?>

albaran7 years ago

display tag cloud in the default theme

albaran7 years ago

add tag cloud in widgets

comment:5 albaran7 years ago

  • Keywords tested added

tested with WP 2.3-alpha SVN revision number 5803

patchs to display the tag cloud (static mode and as widget).

comment:6 foolswisdom7 years ago

  • Keywords has-patch added
  • Milestone changed from 2.3 to 2.4 (next)

Relates to #4130

comment:7 westi6 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.5 to 2.6

In order for this to happen I think the tag cloud would need a heading so we need a patch that adds some code to wp_tag_cloud() to optionally generate a heading like the other things in the sidebar do.

Moving to 2.6 for now.

comment:8 DD325 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Is this ticket still valid?

The tag cloud widget has been available since 2.3, I don't think the tag cloud really needs to exist in the non-dynamic sidebar, if the user wants to customize it, They can customize it via the widgets area.. Its probably unlikely that anyone would want search, tags, categories, pages, and meta displayed..

On the other hand.. users might want that, Along with the calendar, links, and recent comments.. So IMO, Its a bit of a compromise, Users can customize the themes PHP (Which they will do if technical), Else they'll use the widget manager.

I'm closing as worksforme.. reopen if necessary

comment:9 jacobsantos5 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.