WordPress.org

Forums

[resolved] How to show ALL tags? (6 posts)

  1. Shaikailash
    Member
    Posted 2 years ago #

    Hi, I installed wordpress 3.5.1 and I need to show on the homepage ALL tags and not only the most commonly used.
    I activated the plugin "cloud" but i don't understand why it doesn't have an option to show all tags.
    Thanks!

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    either use one of the 'tag cloud widget' plugins which might have the setting;

    or add this to functions.php of your currently used theme:

    add_filter('widget_tag_cloud_args','set_tag_cloud_args');
    function set_tag_cloud_args($args) {
    $args = array('number' => 500);
    return $args; }

    adapted from http://www.transformationpowertools.com/wordpress/edit-widget-parameters-filter-wordpress

  3. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Just a thought on this: As most sites use hundreds or even thousands of tags, WP displays only the most used ones...if you display all of them, over time the list will get too long...

  4. Shaikailash
    Member
    Posted 2 years ago #

    Thanks for helping. I added a plugin which is easily configurable and offer more options ;)
    I am convinced that WP should offer the option to select how many tags the webmaster wants to show. It can make sense to show all tags on some websites. The webmaster should decide if the list is too long ;) imho.

  5. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    I tested above code in a TwentyEleven Child theme using the tag cloud widget but with Categories selected and it output tags, not categories...

  6. alchymyth
    Forum Moderator
    Posted 2 years ago #

    @Seacoast Web Design

    indeed - thanks for pointing this out ;-)
    (I had never before used the tag cloud as category cloud)

    correction:

    add_filter('widget_tag_cloud_args','set_tag_cloud_args');
    function set_tag_cloud_args($args) {
    $args = array_merge($args,array('number' => 500));
    return $args; }

    or better use the alternative code:

    add_filter('widget_tag_cloud_args','set_tag_cloud_args');
    function set_tag_cloud_args($args) {
    $args['number'] = 500;
    return $args; }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags