Insert attachment's tags as tag cloud in image.php
-
I bet there’s a fairly simple method of accomplishing it, but my best efforts aren’t giving me the tags I want and I haven’t been able to find a support forum topic that addresses my issue. I’m trying to edit my attachment template (image.php) to include that particular attachment’s attachment tags in a manner similar to how a post ends with the tags assigned to the post.
Posts use the WP core PHP code,
the_tags, but for the attachments I need the MLA shortcodemla_tag_cloud. At first all I got was all of my tags, but once I added thetaxonomyparameter “attachment_tag,” I began to get the attachment tags. But now I need to limit the cloud to the attachment. That’s what I can’t figure out how to do. I’m guessing I need the “parent” parameter, but how do I get it recognize the particular attachment. I’m using<?php do_shortcodeand want to put all of the parameters into the template file rather than mla_markup.After limiting the tag cloud to the current attachment, I’d like to suppress the variation in sizes. I’m currently using “largest=10 smallest=10,” but that breaks the appearance of the tags.
Finally, I need to set the link of the tags to direct to the gallery page that I have set up, passing along the term.
The topic ‘Insert attachment's tags as tag cloud in image.php’ is closed to new replies.