Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/studio-goliath/goliath-acf-annotated-image/archive/refs/heads/master.zipAn ACF field type to handle image with annotations
Description
With this plugin you can add markers over images with annotations.
Compatibility
This ACF field type is compatible with:
- ACF 5 only, no support for ACF 4
Installation
- Copy the
goliath-acf-annotated-imagefolder into yourwp-content/pluginsfolder - Activate the Image with notes plugin via the plugins admin page
- Create a new field via ACF and select the Image with notes type
- Please refer to the description for more info regarding the field type settings
Use in your theme
- Define your fields of type Annotated Image on ACF admin page
- To load scripts and css as needed on front, in your functions.php add :
if (!is_admin()) { if (function_exists('gacfai_get_field')) { wp_register_style('goliath-annotated-image', plugins_url() . "/goliath-acf-annotated-image/assets/css/goliath-annotated-image.css", array(), '1.0'); wp_register_script('goliath-annotated-image', plugins_url() . "/goliath-acf-annotated-image/assets/js/goliath-annotated-image.js", array('jquery'), '1.0'); } }
// Note that you can define here your custom path to your own css and js
- In your template, instead of get_field, use gacfai_get_field :
if (function_exists('gacfai_get_field')) { echo gacfai_get_field('my-field-name', $post_id, 'thumbnail', false, ''); }
Changelog
1.0.0
- Initial Release.