Question

Hi i need to show random 3 tags for a post. all my posts have been tagged with more than 10 tags, i need to display any 3 tags randomly.

for eg:

A sample post

<a href="/tag1">Tag1</a>
<a href="/tag2">Tag2</a>
<a href="/tag3">Tag3</a>

I am currently using <?PHP the_tags()?> to generate all tags how to restrict it to 3 randomly generated tags.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top