Show empty tags in a tag cloud in WordPress using add_filter

If you are using tags for tagging custom types or fields in WordPress, the core of WordPress will not know about it. That’s why when showing tag cloud widget in a sidebar, it will list only those used in posts. All the other ones are treated as empty tags (unused tags) and they won’t be displayed.

But adding this short code into your theme’s functions.php file will make sure that all tags are listed: