Search
  • Demo Site
  • Test Our Software Here
Search Menu

Examples of using the PHP output

Description

Use the function tag_groups_cloud to obtain the html of the tabbed tag cloud as string. With the second parameter set to true, this function returns an array of groups and tags.

Options

The parameters are largely the same as for the shortcode.

 

Code

echo tag_groups_cloud( array() );

Output

 

Code

print_r( tag_groups_cloud(array(), true ) );

Output

Array
(
    [1] => Array
        (
            [name] => Work
            [term_group] => 2
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 15
                            [link] => https://demo.chattymango.com/tag/journalism/
                            [description] => 
                            [count] => 2
                            [slug] => journalism
                            [name] => journalism
                            [tg_font_size] => 15
                        )

                    [1] => Array
                        (
                            [term_id] => 30
                            [link] => https://demo.chattymango.com/tag/photography/
                            [description] => 
                            [count] => 1
                            [slug] => photography
                            [name] => photography
                            [tg_font_size] => 12
                        )

                    [2] => Array
                        (
                            [term_id] => 18
                            [link] => https://demo.chattymango.com/tag/travel/
                            [description] => 
                            [count] => 1
                            [slug] => travel
                            [name] => travel
                            [tg_font_size] => 12
                        )

                )

            [amount] => 3
        )

    [2] => Array
        (
            [name] => Eat and Drink
            [term_group] => 3
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 31
                            [link] => https://demo.chattymango.com/tag/beer/
                            [description] => 
                            [count] => 2
                            [slug] => beer
                            [name] => beer
                            [tg_font_size] => 12
                        )

                    [1] => Array
                        (
                            [term_id] => 14
                            [link] => https://demo.chattymango.com/tag/cafe/
                            [description] => 
                            [count] => 2
                            [slug] => cafe
                            [name] => café
                            [tg_font_size] => 12
                        )

                    [2] => Array
                        (
                            [term_id] => 16
                            [link] => https://demo.chattymango.com/tag/food/
                            [description] => 
                            [count] => 4
                            [slug] => food
                            [name] => food
                            [tg_font_size] => 22
                        )

                    [3] => Array
                        (
                            [term_id] => 19
                            [link] => https://demo.chattymango.com/tag/restaurant/
                            [description] => 
                            [count] => 3
                            [slug] => restaurant
                            [name] => restaurant
                            [tg_font_size] => 17
                        )

                    [4] => Array
                        (
                            [term_id] => 26
                            [link] => https://demo.chattymango.com/tag/wine/
                            [description] => 
                            [count] => 2
                            [slug] => wine
                            [name] => wine
                            [tg_font_size] => 12
                        )

                )

            [amount] => 5
        )

    [3] => Array
        (
            [name] => Countries
            [term_group] => 1
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 58
                            [link] => https://demo.chattymango.com/tag/brasil/
                            [description] => 
                            [count] => 2
                            [slug] => brasil
                            [name] => Brasil
                            [tg_font_size] => 12
                        )

                    [1] => Array
                        (
                            [term_id] => 42
                            [link] => https://demo.chattymango.com/tag/canada/
                            [description] => 
                            [count] => 2
                            [slug] => canada
                            [name] => Canada
                            [tg_font_size] => 12
                        )

                    [2] => Array
                        (
                            [term_id] => 55
                            [link] => https://demo.chattymango.com/tag/chile/
                            [description] => 
                            [count] => 2
                            [slug] => chile
                            [name] => Chile
                            [tg_font_size] => 12
                        )

                    [3] => Array
                        (
                            [term_id] => 13
                            [link] => https://demo.chattymango.com/tag/czech-republic/
                            [description] => 
                            [count] => 3
                            [slug] => czech-republic
                            [name] => Czech Republic
                            [tg_font_size] => 15
                        )

                    [4] => Array
                        (
                            [term_id] => 43
                            [link] => https://demo.chattymango.com/tag/denmark/
                            [description] => 
                            [count] => 2
                            [slug] => denmark
                            [name] => Denmark
                            [tg_font_size] => 12
                        )

                    [5] => Array
                        (
                            [term_id] => 24
                            [link] => https://demo.chattymango.com/tag/france/
                            [description] => 
                            [count] => 3
                            [slug] => france
                            [name] => France
                            [tg_font_size] => 15
                        )

                    [6] => Array
                        (
                            [term_id] => 22
                            [link] => https://demo.chattymango.com/tag/germany/
                            [description] => 
                            [count] => 3
                            [slug] => germany
                            [name] => Germany
                            [tg_font_size] => 15
                        )

                    [7] => Array
                        (
                            [term_id] => 39
                            [link] => https://demo.chattymango.com/tag/india/
                            [description] => 
                            [count] => 2
                            [slug] => india
                            [name] => India
                            [tg_font_size] => 12
                        )

                    [8] => Array
                        (
                            [term_id] => 50
                            [link] => https://demo.chattymango.com/tag/ireland/
                            [description] => 
                            [count] => 3
                            [slug] => ireland
                            [name] => Ireland
                            [tg_font_size] => 15
                        )

                    [9] => Array
                        (
                            [term_id] => 23
                            [link] => https://demo.chattymango.com/tag/italy/
                            [description] => 
                            [count] => 3
                            [slug] => italy
                            [name] => Italy
                            [tg_font_size] => 15
                        )

                    [10] => Array
                        (
                            [term_id] => 10
                            [link] => https://demo.chattymango.com/tag/japan/
                            [description] => 
                            [count] => 5
                            [slug] => japan
                            [name] => Japan
                            [tg_font_size] => 22
                        )

                    [11] => Array
                        (
                            [term_id] => 47
                            [link] => https://demo.chattymango.com/tag/laos/
                            [description] => 
                            [count] => 2
                            [slug] => laos
                            [name] => Laos
                            [tg_font_size] => 12
                        )

                    [12] => Array
                        (
                            [term_id] => 57
                            [link] => https://demo.chattymango.com/tag/mexico/
                            [description] => 
                            [count] => 2
                            [slug] => mexico
                            [name] => Mexico
                            [tg_font_size] => 12
                        )

                    [13] => Array
                        (
                            [term_id] => 48
                            [link] => https://demo.chattymango.com/tag/myanmar/
                            [description] => 
                            [count] => 2
                            [slug] => myanmar
                            [name] => Myanmar
                            [tg_font_size] => 12
                        )

                    [14] => Array
                        (
                            [term_id] => 44
                            [link] => https://demo.chattymango.com/tag/netherlands/
                            [description] => 
                            [count] => 2
                            [slug] => netherlands
                            [name] => Netherlands
                            [tg_font_size] => 12
                        )

                    [15] => Array
                        (
                            [term_id] => 52
                            [link] => https://demo.chattymango.com/tag/norway/
                            [description] => 
                            [count] => 2
                            [slug] => norway
                            [name] => Norway
                            [tg_font_size] => 12
                        )

                    [16] => Array
                        (
                            [term_id] => 56
                            [link] => https://demo.chattymango.com/tag/peru/
                            [description] => 
                            [count] => 2
                            [slug] => peru
                            [name] => Peru
                            [tg_font_size] => 12
                        )

                    [17] => Array
                        (
                            [term_id] => 59
                            [link] => https://demo.chattymango.com/tag/portugal/
                            [description] => 
                            [count] => 2
                            [slug] => portugal
                            [name] => Portugal
                            [tg_font_size] => 12
                        )

                    [18] => Array
                        (
                            [term_id] => 46
                            [link] => https://demo.chattymango.com/tag/slovakia/
                            [description] => 
                            [count] => 2
                            [slug] => slovakia
                            [name] => Slovakia
                            [tg_font_size] => 12
                        )

                    [19] => Array
                        (
                            [term_id] => 51
                            [link] => https://demo.chattymango.com/tag/sweden/
                            [description] => 
                            [count] => 2
                            [slug] => sweden
                            [name] => Sweden
                            [tg_font_size] => 12
                        )

                    [20] => Array
                        (
                            [term_id] => 49
                            [link] => https://demo.chattymango.com/tag/switzerland/
                            [description] => 
                            [count] => 2
                            [slug] => switzerland
                            [name] => Switzerland
                            [tg_font_size] => 12
                        )

                    [21] => Array
                        (
                            [term_id] => 54
                            [link] => https://demo.chattymango.com/tag/taiwan/
                            [description] => 
                            [count] => 2
                            [slug] => taiwan
                            [name] => Taiwan
                            [tg_font_size] => 12
                        )

                    [22] => Array
                        (
                            [term_id] => 18
                            [link] => https://demo.chattymango.com/tag/travel/
                            [description] => 
                            [count] => 1
                            [slug] => travel
                            [name] => travel
                            [tg_font_size] => 9
                        )

                    [23] => Array
                        (
                            [term_id] => 45
                            [link] => https://demo.chattymango.com/tag/turkey/
                            [description] => 
                            [count] => 2
                            [slug] => turkey
                            [name] => Turkey
                            [tg_font_size] => 12
                        )

                    [24] => Array
                        (
                            [term_id] => 41
                            [link] => https://demo.chattymango.com/tag/uk/
                            [description] => 
                            [count] => 3
                            [slug] => uk
                            [name] => UK
                            [tg_font_size] => 15
                        )

                    [25] => Array
                        (
                            [term_id] => 40
                            [link] => https://demo.chattymango.com/tag/usa/
                            [description] => 
                            [count] => 3
                            [slug] => usa
                            [name] => USA
                            [tg_font_size] => 15
                        )

                    [26] => Array
                        (
                            [term_id] => 53
                            [link] => https://demo.chattymango.com/tag/vietnam/
                            [description] => 
                            [count] => 2
                            [slug] => vietnam
                            [name] => Vietnam
                            [tg_font_size] => 12
                        )

                )

            [amount] => 27
        )

    [4] => Array
        (
            [name] => Architecture
            [term_group] => 6
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 27
                            [link] => https://demo.chattymango.com/tag/pagoda/
                            [description] => 
                            [count] => 1
                            [slug] => pagoda
                            [name] => pagoda
                            [tg_font_size] => 12
                        )

                    [1] => Array
                        (
                            [term_id] => 32
                            [link] => https://demo.chattymango.com/tag/tower/
                            [description] => 
                            [count] => 1
                            [slug] => tower
                            [name] => tower
                            [tg_font_size] => 12
                        )

                )

            [amount] => 2
        )

    [5] => Array
        (
            [name] => WordPress
            [term_group] => 4
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 25
                            [link] => https://demo.chattymango.com/tag/dynamic-post-filter/
                            [description] => The Dynamic Post Filter is a feature of the Tag Groups Premium plugin.
                            [count] => 2
                            [slug] => dynamic-post-filter
                            [name] => Dynamic Post Filter
                            [tg_font_size] => 13
                        )

                    [1] => Array
                        (
                            [term_id] => 33
                            [link] => https://demo.chattymango.com/tag/meta-box/
                            [description] => 
                            [count] => 1
                            [slug] => meta-box
                            [name] => Meta Box
                            [tg_font_size] => 12
                        )

                    [2] => Array
                        (
                            [term_id] => 17
                            [link] => https://demo.chattymango.com/tag/php/
                            [description] => 
                            [count] => 2
                            [slug] => php
                            [name] => PHP
                            [tg_font_size] => 13
                        )

                    [3] => Array
                        (
                            [term_id] => 9
                            [link] => https://demo.chattymango.com/tag/plugins/
                            [description] => 
                            [count] => 11
                            [slug] => plugins
                            [name] => plugins
                            [tg_font_size] => 21
                        )

                    [4] => Array
                        (
                            [term_id] => 63
                            [link] => https://demo.chattymango.com/tag/redirect/
                            [description] => 
                            [count] => 2
                            [slug] => redirect
                            [name] => redirect
                            [tg_font_size] => 13
                        )

                    [5] => Array
                        (
                            [term_id] => 11
                            [link] => https://demo.chattymango.com/tag/shortcode/
                            [description] => 
                            [count] => 9
                            [slug] => shortcode
                            [name] => shortcode
                            [tg_font_size] => 19
                        )

                    [6] => Array
                        (
                            [term_id] => 62
                            [link] => https://demo.chattymango.com/tag/tag-cloud/
                            [description] => 
                            [count] => 6
                            [slug] => tag-cloud
                            [name] => tag cloud
                            [tg_font_size] => 17
                        )

                    [7] => Array
                        (
                            [term_id] => 20
                            [link] => https://demo.chattymango.com/tag/tags/
                            [description] => 
                            [count] => 10
                            [slug] => tags
                            [name] => tags
                            [tg_font_size] => 20
                        )

                )

            [amount] => 8
        )

    [6] => Array
        (
            [name] => Other
            [term_group] => 5
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 29
                            [link] => https://demo.chattymango.com/tag/dictionary/
                            [description] => 
                            [count] => 1
                            [slug] => dictionary
                            [name] => dictionary
                            [tg_font_size] => 12
                        )

                    [1] => Array
                        (
                            [term_id] => 35
                            [link] => https://demo.chattymango.com/tag/spiral/
                            [description] => 
                            [count] => 1
                            [slug] => spiral
                            [name] => spiral
                            [tg_font_size] => 12
                        )

                    [2] => Array
                        (
                            [term_id] => 36
                            [link] => https://demo.chattymango.com/tag/waves/
                            [description] => 
                            [count] => 1
                            [slug] => waves
                            [name] => waves
                            [tg_font_size] => 12
                        )

                )

            [amount] => 3
        )

)