So I have 2 different group of tags in one post, let’s call them list A and B. List A is the tag cloud for the entire site. List B contains the tags or the keywords related to the post. Now, some of the words in list B are repeated in list A. I am trying to figure out a way where the words in list B aren’t repeated in list A (the tag cloud). Is there an easy way to do that. I am new to all of this, so I would appreciate your help.
<?php wp_tag_cloud('smallest=10&largest=10&format=flat&unit=px&separator=, &exclude=<?php the_tags();>'); ?>
You’re trying to embed a php tag into a single quoted string. You can’t do that, see here.
You can do this though:
the_tags()
will echo, you’d want to use get_the_tags() instead.