how can i add all my tags to tagcloud?

admin2025-06-06  9

Hello i would like to show my all tags as a tagcloud . But i want to show all my tags some of them i added manually and they are not connected with any article? Is there any way to do it

this code shows only tags which connected with the articles. i want to show all of them.

<?php 
    $args = array(
        'taxonomy' => array( 'post_tag', 'category' ), 
    ); 

    wp_tag_cloud( $args );
?>

Hello i would like to show my all tags as a tagcloud . But i want to show all my tags some of them i added manually and they are not connected with any article? Is there any way to do it

this code shows only tags which connected with the articles. i want to show all of them.

<?php 
    $args = array(
        'taxonomy' => array( 'post_tag', 'category' ), 
    ); 

    wp_tag_cloud( $args );
?>
Share Improve this question asked Nov 12, 2018 at 20:51 Ersin DemirErsin Demir 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

If you'll take a look at wp_tag_cloud Codex page, then you'll se a list of all args that function takes.

On that list you'll see param called number that defines the maximal count of tags to show. It's default value is 45.

Later you can read that:

number (integer) (optional) The number of actual tags to display in the cloud. (Use '0' to display all tags.) Default: 45

So this should do the trick:

<?php 
    $args = array(
        'taxonomy' => array( 'post_tag', 'category' ), 
        'number' => 0
    ); 

    wp_tag_cloud( $args );
?>
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749187639a317097.html

最新回复(0)