Display tags from tags
-
Let’s say I have a specific list of tags associated to posts that I want to point out, for example: Superman, batman, Chicago. So now let’s say I go to look at some random post in my wordpress with the tag “Superman” I might notice it also has the tag “Red Cape.”
What I’m wanting is to take my list of “Superman, batman, Chicago”, find all the posts that have these specific tags, then display only the tags that share these tags (so for example “Red Cape”), give them a custom link, display them in a random order, and limit how many can be displayed at a time.
So, let’s say I have:
Post 1 with tags Superman, Red Cape
Post 2 with tags Batman
Post 3 with tags Chicago, Life
Post 4 with tags Happy MealWhat I want is some form of php that would return something like (in a random order every refresh and limited to a certain amount of tags to be displayed):
Red Cape, Life(Notice, “Happy Meal” wasn’t displayed because it wasn’t a part of any posts with the original set of tags I wanted to query)
I hope this doesn’t sound as complicated as I think I’m making it sound, thank you!
- The topic ‘Display tags from tags’ is closed to new replies.