HTML tags in tooltip
-
Thank you very much for this nice plugin, which I am testing and I would like to use. Despite some issues (e.g. “accordion”, “tabbed”, and more, but at the moment I don’t care) I’m satisfied how the page with the “tag list” shortcode is rendered. The only problem is that the tooltip that appears when hovering over the link shows all the HTML tags and this is very bad because in those tag descriptions there are a lot of them, e.g. italics (so you see, for example, < em > … < /em >) that I use mainly for musical terminology in English (not the language in which I write), and also many links that send to my articles (i.e. all markup: < a title=”…” href=”…” target=”_blank” rel=”noopener” >…< /a> ).
Other problems are that the description is visible in its entirety, but basically all of them are very long and I would like only an excerpt, like two or three lines – and also there is a number in brackets at the end, which I guess is the post_count, but I don’t want it. I’m not a coder at all, but looking here and there (your documentation) I managed to create this filter:function tag_groups_sanitize_tag_title($title) { return tag_description ($title); } add_filter( 'tag_groups_tag_title', 'tag_groups_sanitize_tag_title' );
which is certainly poorly written and doesn’t do what I would like, but at least it makes the description invisible, i.e. completely eliminates the tooltip. This is the last resort for me if you can’t tell how to strip the HTML and get the excerpt, but possibly I was wondering if you can fix that function above, i.e. remove the tooltip completely from tag_groups_tag_list as it does, but with a correct code.
However for me the ideal solution would be to have a function / filter that shows the tooltip without HTML tags and with an excerpt, without the post_count. Is it possible?
Thanks very much for the attention.
- The topic ‘HTML tags in tooltip’ is closed to new replies.