https://github.com/dmhendricks/tippy-tooltips-wordpress
A simple WordPress plugin to enqueue and initialize Tippy.js tooltips in WordPress
https://github.com/dmhendricks/tippy-tooltips-wordpress
popperjs tippyjs tooltip-plugin tooltips wordpress-plugin
Last synced: 9 months ago
JSON representation
A simple WordPress plugin to enqueue and initialize Tippy.js tooltips in WordPress
- Host: GitHub
- URL: https://github.com/dmhendricks/tippy-tooltips-wordpress
- Owner: dmhendricks
- License: gpl-2.0
- Created: 2020-05-03T13:48:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-23T19:49:47.000Z (almost 6 years ago)
- Last Synced: 2025-07-14T16:41:44.234Z (11 months ago)
- Topics: popperjs, tippyjs, tooltip-plugin, tooltips, wordpress-plugin
- Language: PHP
- Size: 148 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.danhendricks.com/?utm_source=github.com&utm_medium=campaign&utm_content=button&utm_campaign=dmhendricks%2Ftippy-tooltips-wordpress)
[](https://github.com/dmhendricks/tippy-tooltips-wordpress/blob/master/LICENSE)
[](https://m.do.co/t/8a88362f5683?utm_source=github.com&utm_medium=campaign&utm_content=referral&utm_campaign=dmhendricks%2Ftippy-tooltips-wordpress)
[](https://twitter.com/danielhendricks)
[](https://browserstack.com/?utm_source=github.com&utm_medium=referral&utm_content=link&utm_campaign=dmhendricks%2Ftippy-tooltips-wordpress)
# Tippy.js Tooltips Plugin for WordPress
A simple plugin that loads and initializes [Tippy.js](https://atomiks.github.io/tippyjs/) in WordPress.
## Usage
After the plugin is installed and activated, you can [add Tippy tooltips to HTML elements](https://atomiks.github.io/tippyjs/v6/creation/) by setting the `data-tippy-content` attribute. Example:
```html
Example tooltip
```
## Configuration
This plugin does not have a settings page, but you can _optionally_ configure when you want Tippy to load in WP Admin only, the public/frontend of the site, or both by defining the `TIPPY_ENQUEUE_SCRIPTS` constant in `wp-config.php`:
```php
// WP Admin only
define( 'TIPPY_ENQUEUE_SCRIPTS', 'admin' );
// Frontend only
define( 'TIPPY_ENQUEUE_SCRIPTS', 'public' );
// Both (default)
define( 'TIPPY_ENQUEUE_SCRIPTS', true );
```
If this constant is not defined, it defaults to loading in both. You can also define this constant as `false` and load it selectively using:
```php
wp_enqueue_script( 'tippy-tooltips' );
```
### CDN Support
If you'd like the scripts to load from [jsDelivr](https://www.jsdelivr.com/features), you can define the following constant:
```php
define( 'TIPPY_ENABLE_CDN', true );
```
[](https://ga-beacon.appspot.com/?utm_source=github.com&utm_medium=campaign&utm_content=button&utm_campaign=dmhendricks%2Ftippy-tooltips-wordpress)