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] => Meal Type
            [term_group] => 6
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 66
                            [link] => https://demo.chattymango.com/tag/dessert/
                            [description] => 
                            [count] => 2
                            [slug] => dessert
                            [name] => dessert
                            [tg_font_size] => 15
                        )

                    [1] => Array
                        (
                            [term_id] => 32
                            [link] => https://demo.chattymango.com/tag/main-dish/
                            [description] => 
                            [count] => 5
                            [slug] => main-dish
                            [name] => main dish
                            [tg_font_size] => 22
                        )

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

                    [3] => Array
                        (
                            [term_id] => 81
                            [link] => https://demo.chattymango.com/tag/side-dish/
                            [description] => 
                            [count] => 1
                            [slug] => side-dish
                            [name] => side dish
                            [tg_font_size] => 12
                        )

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

                )

            [amount] => 5
        )

    [2] => Array
        (
            [name] => Ingredients
            [term_group] => 2
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 111
                            [link] => https://demo.chattymango.com/tag/apple-cider-vinegar/
                            [description] => 
                            [count] => 1
                            [slug] => apple-cider-vinegar
                            [name] => apple cider vinegar
                            [tg_font_size] => 12
                        )

                    [1] => Array
                        (
                            [term_id] => 84
                            [link] => https://demo.chattymango.com/tag/baking-powder/
                            [description] => 
                            [count] => 2
                            [slug] => baking-powder
                            [name] => baking powder
                            [tg_font_size] => 14
                        )

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

                    [3] => Array
                        (
                            [term_id] => 110
                            [link] => https://demo.chattymango.com/tag/cacao-powder/
                            [description] => 
                            [count] => 1
                            [slug] => cacao-powder
                            [name] => cacao powder
                            [tg_font_size] => 12
                        )

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

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

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

                    [7] => Array
                        (
                            [term_id] => 106
                            [link] => https://demo.chattymango.com/tag/coconut-oil/
                            [description] => 
                            [count] => 1
                            [slug] => coconut-oil
                            [name] => coconut oil
                            [tg_font_size] => 12
                        )

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

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

                    [10] => Array
                        (
                            [term_id] => 83
                            [link] => https://demo.chattymango.com/tag/curry-powder/
                            [description] => 
                            [count] => 1
                            [slug] => curry-powder
                            [name] => curry powder
                            [tg_font_size] => 12
                        )

                    [11] => Array
                        (
                            [term_id] => 78
                            [link] => https://demo.chattymango.com/tag/egg/
                            [description] => 
                            [count] => 2
                            [slug] => egg
                            [name] => egg
                            [tg_font_size] => 14
                        )

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

                    [13] => Array
                        (
                            [term_id] => 91
                            [link] => https://demo.chattymango.com/tag/fish-sauce/
                            [description] => 
                            [count] => 1
                            [slug] => fish-sauce
                            [name] => fish sauce
                            [tg_font_size] => 12
                        )

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

                    [15] => Array
                        (
                            [term_id] => 93
                            [link] => https://demo.chattymango.com/tag/garlic/
                            [description] => 
                            [count] => 2
                            [slug] => garlic
                            [name] => garlic
                            [tg_font_size] => 14
                        )

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

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

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

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

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

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

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

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

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

                    [25] => Array
                        (
                            [term_id] => 87
                            [link] => https://demo.chattymango.com/tag/pepper/
                            [description] => 
                            [count] => 3
                            [slug] => pepper
                            [name] => pepper
                            [tg_font_size] => 16
                        )

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

                    [27] => Array
                        (
                            [term_id] => 86
                            [link] => https://demo.chattymango.com/tag/pork/
                            [description] => 
                            [count] => 2
                            [slug] => pork
                            [name] => pork
                            [tg_font_size] => 14
                        )

                    [28] => Array
                        (
                            [term_id] => 92
                            [link] => https://demo.chattymango.com/tag/rice-vinegar/
                            [description] => 
                            [count] => 1
                            [slug] => rice-vinegar
                            [name] => rice vinegar
                            [tg_font_size] => 12
                        )

                    [29] => Array
                        (
                            [term_id] => 104
                            [link] => https://demo.chattymango.com/tag/rice-wine/
                            [description] => 
                            [count] => 1
                            [slug] => rice-wine
                            [name] => rice wine
                            [tg_font_size] => 12
                        )

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

                    [31] => Array
                        (
                            [term_id] => 90
                            [link] => https://demo.chattymango.com/tag/soy-sauce/
                            [description] => 
                            [count] => 1
                            [slug] => soy-sauce
                            [name] => soy sauce
                            [tg_font_size] => 12
                        )

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

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

                    [34] => Array
                        (
                            [term_id] => 103
                            [link] => https://demo.chattymango.com/tag/teriyaki-sauce/
                            [description] => 
                            [count] => 1
                            [slug] => teriyaki-sauce
                            [name] => Teriyaki sauce
                            [tg_font_size] => 12
                        )

                    [35] => Array
                        (
                            [term_id] => 68
                            [link] => https://demo.chattymango.com/tag/tomato/
                            [description] => 
                            [count] => 2
                            [slug] => tomato
                            [name] => tomato
                            [tg_font_size] => 14
                        )

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

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

                )

            [amount] => 38
        )

    [3] => Array
        (
            [name] => Preparation
            [term_group] => 3
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 77
                            [link] => https://demo.chattymango.com/tag/baking/
                            [description] => 
                            [count] => 2
                            [slug] => baking
                            [name] => baking
                            [tg_font_size] => 15
                        )

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

                    [2] => Array
                        (
                            [term_id] => 18
                            [link] => https://demo.chattymango.com/tag/cold-meals/
                            [description] => 
                            [count] => 2
                            [slug] => cold-meals
                            [name] => cold meals
                            [tg_font_size] => 15
                        )

                    [3] => Array
                        (
                            [term_id] => 15
                            [link] => https://demo.chattymango.com/tag/grilling-frying/
                            [description] => 
                            [count] => 4
                            [slug] => grilling-frying
                            [name] => grilling & frying
                            [tg_font_size] => 22
                        )

                )

            [amount] => 4
        )

    [4] => Array
        (
            [name] => Preparation Time
            [term_group] => 7
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 74
                            [link] => https://demo.chattymango.com/tag/1-hour/
                            [description] => 
                            [count] => 3
                            [slug] => 1-hour
                            [name] => 1 hour
                            [tg_font_size] => 22
                        )

                    [1] => Array
                        (
                            [term_id] => 73
                            [link] => https://demo.chattymango.com/tag/15-min/
                            [description] => 
                            [count] => 2
                            [slug] => 15-min
                            [name] => 15 min
                            [tg_font_size] => 17
                        )

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

                    [3] => Array
                        (
                            [term_id] => 80
                            [link] => https://demo.chattymango.com/tag/30-mins/
                            [description] => 
                            [count] => 3
                            [slug] => 30-mins
                            [name] => 30 mins
                            [tg_font_size] => 22
                        )

                )

            [amount] => 4
        )

    [5] => Array
        (
            [name] => Origin
            [term_group] => 1
            [tags] => Array
                (
                    [0] => Array
                        (
                            [term_id] => 114
                            [link] => https://demo.chattymango.com/tag/austria/
                            [description] => 
                            [count] => 1
                            [slug] => austria
                            [name] => Austria
                            [tg_font_size] => 12
                        )

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

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

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

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

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

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

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

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

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

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

                )

            [amount] => 11
        )

    [6] => 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] => 64
                            [link] => https://demo.chattymango.com/tag/filter/
                            [description] => 
                            [count] => 1
                            [slug] => filter
                            [name] => filter
                            [tg_font_size] => 12
                        )

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

                    [3] => 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
                        )

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

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

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

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

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

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

                )

            [amount] => 10
        )

    [7] => 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
        )

)
Please find more information about Tag Groups on the plugin main page.
Share
Updated: 2018-04-13T06:53:36+00:00