Web integrations
Starting
To use the plugin, it's necessary to configure the token to interact with the API. The token can be obtained from "My gallery -> Integrations -> Web".
Once the token has been configured, a first import of the data can be done using a button in the general settings section of the ITgallery WP plugin (“Gallery Options”).
Shortcodes
- [itgallery_display_artist artist_id=X]
- [itgallery_display_artists]
- [itgallery_display_work work_id=X]
- [itgallery_display_works]
- [itgallery_display_expo expo_id=X]
- [itgallery_display_expos]
Lists
Note: It may be necessary to update the “permalinks” on the web to see the routes (Settings → Permanent links).
It is possible to modify the path of each listing, as well as the fields to display, HTML and CSS.
Editing HTML/CSS
It is possible to modify the HTML and CSS displayed from the plugin configuration, as well as the visible fields on the front-end.
To display dynamic fields in HTML, they will have to be placed between two "%" symbols. For example, it is possible to display the name of an artist with %name%.
Forcing data sync
In the plugin options, there is a button to force content updates by calling the ITGallery API
Data sync via Cron
By default, the plugin activates a WordPress cron that runs daily to update artists, artworks, and exhibits. It is also ready to be able to execute the import through real cron on the server:
It can be executed directly from the server with a command line similar to the following (modifying the PHP and file path according to the server): /usr/bin/php /PATH_SERVIDOR/wp-content/plugins/itgallery-wp/itgallery-import.php
Anex I: available fields
- id
- link
- name
- surname
- type
- phone1
- phone2
- email1
- email2
- photo
- document_id
- bio
- notes
- country
- city
- nacionality
- birth_country
- birth_date
- birth_city
- death_country
- death_date
- death_city
- studio_address
- personal_address
- last_modified
- created
Artwork
- id
- link
- name
- inventory_id
- year
- type
- technique
- location
- sub_location
- main_image
- thumbnail
- availability
- artist
- prices
- variable_measures
- dimensions
- tags
- last_modified
- created
Exhibition
- id
- link
- name
- description
- timetable
- type
- caracter
- main_image
- thumbnail
- opening_date
- closing_date
- opening_begin_hour
- opening_end_hour
- url
- last_modified
- created