Hi,
We have shortcode to display single post tags, categories, and custom taxonomies. It would be great to have a shortcode that can display all the taxonomies(including custom taxonomies) in one place by putting comma separated values. For example, a shortcode that takes the following values, categories, post_tags, custom-taxonomy-1, custom-taxonomy-2 and display all of them in one place skipping the taxonomy that is not used for the article.
If you think that’s enough for you to know, you can skip the rest of the post. But if you want to know why I made this request, please continue reading.
The reason is that tags in wordpress are painfully disorganized.
Suppose you have a tech blog. The categories are
- OS(subcategories(Linux, Windows, Mac, etc));
- Programming(subcategories(software dev, web dev, AI, etc));
- Sysadmin(subcategories(security, performance, monitoring, etc));
Everything’s sweet upto this point.
Now, tags come into play…Suppose we have these tags:
js, css, python, c#, commands, cloud, database, dns, networking, firewalls, mathematics, algorithm, scaling, infrastructure, servers, ubuntu, debian, fedora, css, html, responsive web design, apache, nginx, litespeed, oop, mysql, response time, jobs, remote work, visualstudio, support, updates, disaster management, testing, training, etc.
You can see there is no organization among tags. But there is a pattern, some tags are programming languages, some are OS, some are web servers, some are performance related. One can argue as to why not use them as sub-sub categories for organization? But a job tag could be placed in a lot of categories and so could be python and a lot of others. Moreover, a tag is open and free of relations and hierarchy. Also tags could be thousands in numbers, categories shouldn’t be.
But this is not the main issue because everthing can be solved with the help of custom taxonomies using a plugin.
Following custom taxonomies can be created:-
Tag Programming Language— js, c++, python, c#, java, swift, php, html, css, c and a lot more
Tag Work— Job, workplace, remote work, team management, salary, interview prepration, etc
Tag Software— VS code, notepade++, putty, virtualmin, termius, cyberduck, etc
Tag Infotech— dns, networking, infrastructure, clustering, cloud computing, scaling, firewalls, scripting, nginx, and a
hundred more.
This type of organization is not possible with categories. Firstly because the above organization is not hierarchical, secondly there’s no stress of numbers. They can be in thousands. Thirdly, they don’t share any exclusive relationship to their parent.
You might ask why I want this. User experience. That’s all.
For example, I can make separate section for different types of taxonomies for users to see. A section for softwares, a section for infotech, a section for programming languages, etc, or put softwares, infotech or programming languages in the header menu along with the categories. Imagine seeing a section displaying hundreds of tags on a website on a single page. That would a disaster. Pure chaos. But with custom taxonomy I can achive this.
Now the problem is everything is ready. I have four different type of custom taxonomy. I write an article that requires these tags— job, python, cloud, termius. But, as seen above, these are all different taxonomies(not tags).
To display them on my article, I have to use four different custom taxonomy shortcodes and put each taxonomy in each shortcode setting. These would occupy four horizontal lines(a lot of space, and will look ugly).
It would make the job a lot easier if just one shortcode could do this job. Like putting work, infotech, programming language, softwares, etc in the shortcode will show all the taxonomy terms at one place like tags. And if a term is put in shortcode but is not used in article, it won’t appear. Because you don’t know which taxonomy would be used on which article because it’s a global template. So you put all of them and the unused ones are not shown.
All you would have to do is create a shortcode that is able to accept multiple types of taxonomies and display them in one row(inline) and discard the taxonomy types that are not used even if they are in shortcode.
Thanks.
If you want, I can share examples.
But these shortcodes occupy different lines. They don’t display inline.
For example if one taxonomy has only one term, it will still take entire space infront of it and the next shortcode will begin in the next line. If I have five taxonomy types with one term each taxonomy type, it will take five different lines.