Sure, just feed your tag list to wp_generate_tag_cloud:
$found_tags = $final_tags = $id_records = array();
// get last 10 posts
$last_posts = get_posts('numberposts=10');
// gather tags
foreach($last_posts as $post)
$found_tags = array_merge($found_tags, wp_get_post_tags($post->ID));
// prepare final tags for the cloud
foreach($found_tags as $tag){
// ignore duplicates
if(in_array($tag->term_id, $id_records))
continue;
// track ids...
$id_records[] = $tag->term_id;
// generate links
$tag->link = get_tag_link($tag);
// keep it
$final_tags[] = $tag;
}
// feed to the cloud
print wp_generate_tag_cloud($final_tags);
You might want to cache this, because it makes quite a few queries
Related Posts:
- Why is wp_kses not keeping style attributes as expected?
- Order tags, but not alphabetically
- How do I display a tag cloud under my post that only shows tags from that post?
- how can I use WP_Query to exclude a specific tag.?
- not functioning
- Best way to show map of tagged posts?
- Remove a particular tag name from the tagcloud
- How do I change the output of get_the_tag_list()?
- How to remove Tags: text from the_tags?
- What are allowedposttags and allowedtags?
- When switching from html to visual editor the tag gets erased
- List ‘n’ number of posts from a Tag, each with a different class or ID
- How can I extend Quick Edit option with 2 more fields
- How to separate the tags?
- alt attributes not showing on pages
- Add # before each tag
- term/tag not being saved for custom post type
- display tag slug as class per link in tag cloud
- require one tag for each post
- How to add class on term link?
- get_terms with more than x post count
- Why ‘C++’ tag is converted to ‘C# ‘?
- How to use meta data for each tag cloud a
- Limit tag cloud terms by date
- Is is possible to rebuild wp_term_relationships table?
- Sort list of WordPress Page under tag when is_tag() called
- URL scheme to retrieve tag archive by ID
- How to get all tags collections in woocommerce?
- In need of array of post tags
- Get the tags as an array, convert the tag into a string, and then replace spaces with dash
- Setting a value on existing tag metadata field when that tag was just created by a user
- Query all posts which do not have tags assigned to them
- Creating a “Tags” page with search option, instead of using a widget
- How to list custom tags too, to wp-list-table table?
- how to filter each tag item?
- Display posts and thumbnails with certain tags
- Creating custom tags
- What is the best way to create a menu item that links to all posts with a certain tag?
- mystery tags which I didn’t add – vulnerability?
- Using HTML 5 Details/Summary Tag
- Get all terms if product of that term contains a specific category
- How can the user place a custom text string as a placeholder for a plugin
- Show post tags on attachment page?
- using get_the_category to get all post categories except one
- What hooks are needed to bind a tag to a reusable block?
- Adding post tags without capability edit_posts
- Track tags in Google Analytics? [closed]
- Remove short link tag from particular page
- tags not showing on custom post type single page
- How to get the first tag of a post as a hyperlink?
- Echo tag name if post has one of the tags
- Display post if a specific tag is present
- Why is Heading tag Auto applied to Post data? [closed]
- Do we have In_category like function for tags?
- Tagcloud: different color for different text size
- Can’t Find a “Most Popular Tags” Hack Anywhere [closed]
- How to display related posts from this code?
- Change Size of P Tag on One Page Template [closed]
- How to add a class to anchor tags using the get_the_tag_list(); function? [duplicate]
- category specific most used tags query
- Outputting HTML elements through WP-API
- Is there a way to retire old tags?
- Bumping a (tagged) post to the top of archives
- how to add # before tags?
- Tags page not for post
- Is it possible to embed a wordpress tag page on wordpress?
- List latest post for each tag with a category
- How can I combine WordPress default Tags and bbPress tags into one archive page?
- How to add product tag to order list
- How do I display all tags (linked) from all posts, inline, with a separator?
- Hide/exclude certain tags under single post
- Show ‘tags’ for a post on the frontend when in a list view
- How remove tags just have one post?
- How to remove base tags at the wordpress
- How are special characters encoded in tag-URL?
- How to show tags + posts for a custom taxonomy?
- How can I show a tag description, using ‘slug’ rather than ‘id’
- Is it possible to have a Faceted Navigation/Filters on a Product Tag page?
- How to list tags
- If tag x then show y + tag name(s)
- Conditional inside search result excerpt
- Show all tags NOT applied to post
- Hide Tag Title When No Tags
- Is There A Way To Add Weight Or Order To Tags?
- Mapping external data to tags via term_id
- How to take list of words and insert them as terms to become tags of a post
- Tag selection while adding new post
- Create three unique tag page templates
- Assign tags records that have a keyword
- where to find on backend to amend and edit title tage for each page on website?
- Tags Sorted By Characters?
- How to include post count in this “get_tags” snippet
- How to make a Post Tag primary?
- How to retrieve the post_id of a tag page?
- How can I edit the slugs of tags?
- Exclude specific tag or tags from related posts?
- How to add tags to identify custom post types in archives?
- Datetime on time tag wordpress puts it outside the tag
- See when a tag was first added
- wordpress assign all existing tags to a specific post