I’ll start by saying that I have no background in php.
I need to embed a shortcode to display the name of the specific taxonomy the post is associated with.
The shortcode is embedded in a single post template.
Remarks:
- I don’t need a link to the taxonomy.
- how can i embedded it as a shortcode?
I would appreciate your help
2
Answers
Please try the following code to fetch all the taxonomies associated with post.
make sure you’re receiving the proper post ID and correct taxonomy name, so you may need a little bit of debugging, please let me know if you’re facing any issues. I’ll be happy to help further.
If you want show only one taxonomy you can try this following version of code.