$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>how can i add all my tags to tagcloud?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

how can i add all my tags to tagcloud?

matteradmin8PV0评论

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 );
?>

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far