Skip to content
TaxoPress
  • TaxoPress
  • Tag Groups
  • Docs
  • Blog
  • Support
  • Login
Buy Now
TaxoPress

TaxoPress: Getting Started

  • Capabilities / Permissions in TaxoPress
  • How to Install TaxoPress
  • Technical Requirements for TaxoPress
  • How to Activate or Deactivate TaxoPress Features
  • How to Move from TaxoPress Free to Pro
  • TaxoPress Free vs Pro

TaxoPress: Taxonomies

  • Introduction to the Taxonomies Screen
  • Taxonomies: Post Types
  • Taxonomies: Permalinks
  • Taxonomies: Admin Area
  • Taxonomies: Other Labels
  • Taxonomies: REST API
  • Taxonomies: Advanced
  • Taxonomies: Deactivate or Delete
  • Media Tags

TaxoPress: Terms

  • Introduction to the Terms Screen

TaxoPress: Terms Display

  • Introduction to Terms Display
  • Show the Terms Display with a Shortcode
  • Show the Terms Display in a Widget
  • Change the Format of Terms Display
  • Add CSS to Your Terms Display
  • Show Terms Display Using PHP

TaxoPress: Current Post

  • Introduction to Terms for Current Post
  • Automatically Display Terms for Current Post
  • Options for Terms for Current Post
  • Change the Format of Terms for Current Post
  • Add CSS to Terms for Current Post
  • Show Current Post Terms With PHP

TaxoPress: Related Posts

  • Introduction to Related Posts
  • Where to Display Related Posts
  • Options for Related Posts
  • Change the Format of Related Posts
  • Add CSS to Your Related Posts
  • Show Related Posts Using PHP

TaxoPress: Auto Links

  • Introduction to Auto Links
  • Auto Links Options

TaxoPress: Auto Terms

  • Introduction to Auto Terms
  • Auto Terms Options
  • Sources for Auto Terms
  • Automatically Add New Terms
  • Automatically Add Existing Terms
  • Add Auto Terms to Existing Content
  • How to Schedule the Auto Terms Feature
  • Logs for Auto Terms
  • Use Regular Expressions to Analyze Content
  • The Auto Terms Feature on Large Sites

TaxoPress: Suggest Terms

  • Introduction to Suggest Terms
  • Using the Dandelion API for Suggest Terms
  • Using the OpenCalais API for Suggest Terms

TaxoPress: Mass Edit Terms

  • Introduction to Mass Edit Terms

TaxoPress: Manage Terms

  • Introduction to Manage Terms
  • Add Terms
  • Merge Terms
  • Remove Terms
  • Rename Terms
  • Delete Terms
  • Delete Unused Terms

TaxoPress: Integrations

  • Working with the Dandelion API
  • How to Register for the Dandelion API Service
  • How to Register for OpenCalais
  • Functions for Theme Integration

TaxoPress: Troubleshooting

  • Characters and Alphabets Supported by TaxoPress
  • The Auto Terms Feature on Large Sites
  • What Happened to the Click Tags Feature?
  • Troubleshooting TaxoPress Screens
  • Home
  • TaxoPress Documentation
  • The TaxoPress Plugin
  • TaxoPress: Terms Display
  • Show Terms Display Using PHP

Show Terms Display Using PHP

Table of Contents
  • Legacy PHP Code

It is possible to add the Terms Display output directly into your site’s PHP files.

The best approach is to use the PHP to include the shortcode inside a PHP snippet, as in this example below.

<?php echo do_shortcode("[taxopress_termsdisplay id="1"]"); ?>

Legacy PHP Code #

There is also a legacy option allows you to make choices directly in the PHP code. This is the basic code snippet:

<?php st_tag_cloud(); ?>

Here are examples of how you can customize that basic code with more details:

'size' => 'true',
'smallest' => 8,
'largest' => 22,
'unit' => 'pt',
'color' => 'true',
'maxcolor' => '#000000',
'mincolor' => '#CCCCCC',
'number' => 45,
'format' => 'flat',
'cloud_selection' => 'count-desc',
'cloud_sort' => 'random',
'exclude' => '',
'include' => '',
'limit_days' => 0,
'min_usage' => 0,
'notagstext' => __('No tags.', 'simpletags'),
'xformat' => __('<a href="%tag_link%" class="tag-link-%tag_id%" title="%tag_count% topics" %tag_rel% style="%tag_size% %tag_color%">%tag_name%</a>', 'simpletags'),
'title' => __('<h4>Tag Cloud</h4>', 'simpletags'),
'category' => 0,
'taxonomy' => 'post_tag

Here is an example of that legacy code in use. In this code, we display randomly the top 100 tags. The max width will be 45px and the min is 12px. The color used for max tags will be red (#FF0000) and for min tags green (#00FF0B).

<?php st_tag_cloud('cloud_selection=count-desc&cloud_sort=random&number=100&title=Mon nuage de tags&largest=45&smallest=12&unit=px&maxcolor=#FF0000&mincolor=#00FF0B'); ?

Here are all the legacy code parameters:

  • size
    • (boolean) Active or not dynamic font size generation
  • smallest
    • (integer) Length of the font to use to show the less used tags
  • largest
    • (integer) Length of the font to use to show the most used tags
  • unit
    • (string) Measuring unit of the used font for smallest and largest parameters. Use pt for point
  • color
    • (boolean) Active or not dynamic color generation. true/false
  • maxcolor
    • (string) Used color for most popular tags
  • mincolor
    • (string) Used color for less popular tags
  • number
    • (integer) Number of tags to show inside the tags cloud (Use ‘0’ to show all of them)
  • format
    • (string) Tag’s format of posting
      • flat – (Default) Tags are separated by spaces
      • list – tags are inside a non ordered list (UL) containing class=’st-tag-cloud’
      • array – tags are inside a PHP array (use it with st_get_tag_cloud())
  • cloud_selection
    • (string) Tags selection order. Valid values are :
      • count-desc – (default) by number of usage tags (most popular)
      • count-asc – by number of usage tags (least used)
      • name-asc – by tag name ascending
      • name-desc – by tag name descending
      • random – random
  • cloud_sort
    • (string) Tags selection order. Valid values are :
      • count-desc – by number of usage tags (most popular)
      • count-asc – by number of usage tags (least used)
      • name-asc – by tag name ascending
      • name-desc – by tag name descending
      • random – (default) random
  • exclude
    • (string) list of tags to exclude, separated by commas (term_id). For example ‘exclude=5,27’ means all tags which contain term_id 5 or 27 will be NOT shown. By default, any tag is excluded.
  • include
    • (string) list of tags to include, separated by commas (term_id). For example ‘exclude=5,27’ means all tags which contain term_id 5 or 27 will be the alone tags to be shown. By default, all tags are included
  • limit_days
    • (integer) Number of days to be considered to generated tag cloud.
  • min_usage
    • (integer) Min number of tag counter for display it into tag cloud
  • notagstext
    • (string) Text to show, if there is no tag.
  • xformat
    • (string) Extended format of links. You can personalize the formating of tag’s link. Available markups :
      • tag_link – Replaced by the permalink of the tag
      • tag_feed – Replaced by the RSS tag link
      • tag_id – Replaced by the tag ID
      • tag_count – Replaced by the use number (counter) of the tag
      • tag_size – Replaced by the size of the tag (creates : font-size:17pt;)
      • tag_color – Replaced by the color of the tag (creates : color:#666666;)
      • tag_name – Replaced by the tag’s name
      • tag_name_attribute – Replaced by the tag’s name, formatted for attribute HTML
      • tag_rel – Replaced by rel tag markup (creates : rel=”tag”)
      • tag_scale – Replaced by tag scale (between 1 and 10)
      • tag_technorati – Replaced by Technorati tag link
      • tag_flickr – Replaced by Flickr tag link
      • tag_delicious – Replaced by Del.ici.ous tag link
  • title
    • (string) Specify the positioned title shown before tags cloud
  • category
    • (string) Restrict tag cloud to a specific category. (or more, separated with comma)
  • taxonomy
    • (string) Select taxonomy to used for tag cloud
Add CSS to Your Terms Display
Table of Contents
  • Legacy PHP Code

Recent Posts

  • The Tag Groups Plugin is Live Here on TaxoPress March 1, 2023
  • How to Show WordPress Posts With a Specific Taxonomy Term November 11, 2022
  • How to Use the Site Editor to Design WordPress Taxonomy Archives November 9, 2022
  • What Characters Are Allowed in WordPress Taxonomy Terms? October 26, 2022
  • The Tag Groups Plugin is Now Part of TaxoPress October 14, 2022

Testimonials

I’m using the paid version to display posts based on tags selected. I found it simple to use and straightforward. You can get results very quickly with this, and it’s impressive. It also looks great.

121website

It is awesome to finally have tags organized. Thank you so much for this simple but powerful plugin!

kenethrd

Important Links

  • TaxoPress Demos
  • Frequently Asked Questions
  • About the TaxoPress Team
  • Terms of Service
  • TaxoPress Affiliates
  • Logo and Brand Materials

Our Projects

  • PublishPress
  • MetaSlider
  • KinshiPress
  • Ramble Ventures
  • Logtivity

© 2023 TaxoPress

Facebook Twitter
Scroll to top
  • TaxoPress
  • Tag Groups
  • Docs
  • Blog
  • Support
Search