Title attribute in tag description
-
Hi @camthor, sorry I’m still here because I’ve been trying for days to solve the problem of the too long description in tooltip (here) by myself, but I didn’t make it. Although I found many questions and answers that were close to mine, the case is specific and I haven’t been able to fit anything to my purpose, also because I know very little about PHP.
The alternative is to usecustom_title = ""
to remove the description entirely, but importing locally some more content from the production site I realized that the lists will be full of terms because I would like to create a kind of music glossary, and so it would be better for the user to have some preview when hovering, instead of a lot of “dumb” links, without being forced to open many of them, and also to entice him to continue reading.I like your plugin because it is simple and does what it does comfortably (e.g., I really like the ease with which you can create and then assign the group with the quick edit from the tag list), and with the choice of limiting the length of the description it would be perfect. It would be possible to do it with a filter? Something like
function custom_excerpt_length( $length ) { if( ...() ) { return "$number of words or characters, with ellipsis"; } } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
or with
$max_len =
, orwp_trim_words
, or maybe – I don’t know if it is much more complicated since you have to change the code – with another parameter for the shortcode on the “custom title” as well as {name} etc., for an excerpt, or word / character limit in description?
- The topic ‘Title attribute in tag description’ is closed to new replies.