Articles of the tags

the_tags() : display the tags by the order they are typed in in the backend, not alphabetically

I’m using WordPress’ the_tags() to display the tags of each post on a single side. What I intend to do is to display the tags by the order they are typed in in the backend, and not by alphabetical order. The WordPress codex doesn’t seem to have an argument to sort the_tags() and the output […]

How to not show tags if the post doesn't have any?

I currently have the following trying to avoid showing tags (the icon in this case) when there aren’t any, but the icon continues to show up. Any thoughts? <?php if ( is_singular() && function_exists(‘the_tags’) ) : ?> <p><i class=”icon-tags”></i><?php the_tags(”, ‘, ‘, ‘ ‘); ?></p> <?php endif; ?>

Post tags show outside loop?

I’m trying to use tags of the single post, as meta keywords. I tried using this: <meta name=”keywords” content=”<?php the_tags(”,’,’,”);?>test<?php }?>”/> It works, but the output is: <meta name=”keywords” content=”<a href=”http://127.0.0.1/1/tag/aquaman/” rel=”tag”>aquaman</a>,<a href=”http://127.0.0.1/1/tag/batman/” rel=”tag”>batman</a>,<a href=”http://127.0.0.1/1/tag/wonder-woman/” rel=”tag”>wonder woman</a>”/> Is it possible to remove the tags link/URL? And just the text/tag itself will appear?

How to display the_tags() as plain text

the_tags by default is displaying as URL. I need to display it as plain text to insert inside HTML attribute. <?php $tag = the_tags(”); ?> <div class=”image-portfolio” data-section=”<?php echo $tag ?>”>