1

I'm working on a WordPress ecommerce site. They want to have some industry-specific words (like "ADA Compliant, ANSI/BHMI") have tooltips with definitions.

I've added tooltips via tooltipster and created a shortcode for manually adding tooltips, but as these words are repeated many times throughout the site, I really want to give them a single interface where they can define a single instance of word + tooltip, that affects everwhere those words are written in the content.

The only thing I can think of is a gettext filter, but it seems like that would be terrible for performance, since they will have a lot of words.

I'd love some ideas of how I could achieve this. I don't know what direction to go in. (Translation won't work since it's in the content, not theme or plugin strings.)

  • Why not just use a custom Options page. You could either create one manually or use a plugin like Advanced Custom Fields. Create a couple of text fields there, and then use them either in your shortcode or any other template where the tooltips exist. – DubVader Feb 21 '20 at 15:21
  • Maybe you could use some plugins for glossary like [CM Tooltip Glossary](https://wordpress.org/plugins/enhanced-tooltipglossary/) or [Glossary](https://wordpress.org/plugins/glossary-by-codeat/) – Cadu De Castro Alves Feb 21 '20 at 16:54
  • Thanks! @DubVader, I'm not clear on how that would affect existing content. Would we still have to replace all instances of each phrase with a shortcode? – user2700105 Feb 24 '20 at 01:38
  • @CaduDeCastroAlves Thank you!! I was searching for "tooltips" and not glossary, but a glossary will do just what I need (we just won't use the archive page). – user2700105 Feb 25 '20 at 15:34

0 Answers0