This plugin allows us to:
- Add a new "LE Offers" content block to a post
- Enter a Google placeId in that block (eg.
ChIJoQ8Q6NNB0S0RkOYkS7EPkSQ
is the ID for Bali) - Display a list of LE offers in that Place ID in the user-facing site
Gutenberg Examples are distributed as WordPress plugin.
- Download a pre-built zip archive of the latest release.
Do not download from the "Clone or download" GitHub button, as this includes the source material only. Read the Development instructions below if you’re interested in building your own copy of the plugin.
- Navigate to the Plugins > Add new screen in your WordPress administrative dashboard.
- Click Add New at the top of the page.
- Click Upload Plugin at the top of the page.
- Click Choose File, then find and Upload the downloaded zip file.
- After the plugin finishes installing, click Activate.
- You’re done!
You can run a Wordpress instance using Docker Compose:
docker-compose up -d
Visit http://localhost:9999
To stop:
docker-compose stop
Visit http://localhost:9999/wp-admin/plugins.php and activate luxury-escapes-plugin
. The docker-compose.yml file has mapped this folder to the docker container, so as you change files in this folder, they'll be reflected live in your site.
To install the node packages
yarn install
To build the production version of the plugin
yarn build
To build a development version, change to the local directory of the block you are working on, and run yarn start
to watch for changes and automatically rebuild as you develop.
cd le-offers/
npm start
To install the plugin, or upload a new version:
- Ensure you've built your latest scripts first with yarn build!
- Ensure you've git-committed your latest changes (only committed changes are included in the zip)
- run
yarn zip
to create a zip file of this plugin - visit the wordpress plugins page, click "upload plugin", and upload the zip file.
- If it complains about the plugin not having a valid header, just visit https://dream.luxuryescapes.com/wp-admin/plugins.php and activate it from there.
Plugin example screenshots: