Special New Year Sale

Save 23% on TaxoPress with this coupon:

NewYear2023

Buy Now
TaxoPress
reorder
  • Features
  • Docs
  • Blog
  • Support
  • Login
  • Get TaxoPress Pro

TaxoPress: Getting Started

  • 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
  • Characters and Alphabets Supported by TaxoPress

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

  • The Auto Terms Feature on Large Sites
  • 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

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: Security

  • Automated Security Checks, including Checkmarx
  • Security Issues and How to Report Them
  • Capabilities / Permissions in TaxoPress

TaxoPress Pro

  • TaxoPress Free vs Pro
  • How to Move from TaxoPress Free to Pro
  • TaxoPress License Keys and Multisite Networks
  • TaxoPress Pro License Keys and Local Environments
  • TaxoPress Pro Refund Policy

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

  • The Auto Terms Feature on Large Sites
  • What Happened to the Click Tags Feature?
  • Troubleshooting TaxoPress Screens
  • Home
  • TaxoPress Documentation
  • TaxoPress
  • TaxoPress: Current Post
  • Show Current Post Terms With PHP

Show Current Post Terms With PHP

It is possible to add the “Terms for Current Post” 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_postterms id="1"]"); ?>

Legacy PHP Code

There is also a legacy option allows you to make choices directly in the PHP code. This feature extends WordPress built-in function “the_tags()”. This is the basic code snippet.

<?php st_the_tags(); ?>

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

'before' => __('Tags: ', 'simpletags'),
'separator' => ', ',
'after' => '<br />',
'post_id' => '',
'xformat' => __('<a href="%tag_link%" title="%tag_name%" %tag_rel%>%tag_name%</a>', 'simpletags'),
'notagtext' => __('No tag for this post.', 'simpletags'),
'number' => 0

Here are all the legacy code parameters:

  • before
    • (string) Text to display before the actual tags are displayed. Defaults to Tags:
  • separator
    • (string) Text or character to display between each tag link. The default is a comma (,) between each tag.
  • after
    • (string) Text to display after the last tag. The default is to display nothing.
  • post_id
    • (integer) Specified post ID for display tag posts (outside loop by example)
  • xformat
    • (string) Extended format of links. You can personalize the formatting 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_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_technorati – Replaced by Technorati tag link
      • tag_flickr – Replaced by Flickr tag link
      • tag_delicious – Replaced by Del.ici.ous tag link
  • notagtext
    • (string) Text to show, if there is no tag.
  • number
    • (integer) Limit tags output with this max number

Recent Posts

  • 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
  • How to Merge Similar Taxonomy Terms in WordPress September 14, 2022

Testimonials

I had a support issue and the response was same day. I find the plugin extremely fast and easy to implement.

stevenmayjr

I’ve used this for a long time and it is really a great plugin. If you need terms tagging capabilities, this is great!

woodb01

Search TaxoPress.com

Important Links

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

Our Projects

  • PublishPress
  • MetaSlider
  • KinshiPress
  • Ramble Ventures
  • Logtivity