constructive/wp-glossary

An interactive glossary for WordPress

1.0.2 2020-11-06 05:53 UTC

This package is not auto-updated.

Last update: 2024-04-23 17:57:50 UTC


README

WP Glossary is an interactive glossary for WordPress.

  • A glossary content type
  • JavaScript for highlighting glossary terms with a hoverable tooltip

 

Installation

composer require constructive/wp-glossary

 

If you are using the Constructive WP Theme, add the Glossary Service Provider to the providers config:

return [
    \Constructive\Glossary\GlossaryServiceProvider::class
];

  If not, you should just manually copy the code from GlossaryServiceProvider::register() into youf functions.php. Kind of gross, but it should work for now.

 

Usage

Copy the wp-glossary.js and wp-glossary.css from the dist/ folder into your project and enqeue those scripts.

Make a few glossary items, wrap the class of .wp-glossary-scan to any elements with text that you want highlighted as a glossary term, and you should be all set.

example

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT