Embedding CloudTables in your WordPress site is made easy through our plug-in for WordPress.
The CloudTables plug-in for WordPress is available in the WordPress plug-ins directory. As such, installation can be done directly from your WordPress dashboard:
Note that if the automatic download and install fails (e.g. write permissions on your server), you can manually download the software and install it in the wp-content/plugins
directory for your WordPress install.
Once installed click the Settings option for the CloudTables plug-in or use the WordPress admin menu to go to Settings -> CloudTables. Here you will now need to fill in information so the plug-in can securely connect to your CloudTables application:
Click "Save Changes" to save. The plug-in will then connect to the CloudTables server and show the connection status. If all is well a list of data sets that you have available (based on the Editor API Key) will be shown at the bottom of the page.
When the CloudTables plug-in for WordPress is installed, you'll be able to embed tables directly into your WordPress pages and posts using WordPress' built in block editor, or through the use of a short code if you prefer.
Create a new block by clicking the "+" icon in the page / post editor. Select the CloudTables option from the Layout Elements category, or search for "CloudTables". This will show the CloudTables logo where the table will appear on your page.
In the inspector panel on the right, there is a Properties panel. From here you can select the data set that you wish to embed into the page. Note that multiple CloudTables can be shown on the same page no problem.
You might also note that there is an API key option in the properties panel. This value is optional, but can be used to specify a particular API key, if you wish to embed this table with specific access rights, rather than the global keys given in the settings page (see above).
If you prefer Using WordPress' classic editor, you can use CloudTables through short codes - specifically the format to use is:
[cloudtable id="{datasetId}" key="{optionalApiKey}"]
where:
{datasetId}
is the ID of the data set you want to show. The data set ID can be found on the "Data" tab of the data set in question, or in the list of data sets you have access to in the CloudTables settings for WordPress.{optionalApiKey}
is an optional parameter - normally you could leave this off. It is provided as a way to specify a particular API key if you wish to embed this table with specific access rights, rather than the global keys given in the settings page.One common issue that you might stumble into is your embedded CloudTable showing perfectly in your post, but not on the home page! This is because WordPress automatically generates a 55 word excerpt for each post and in the process of doing so strips short codes such as those used to insert CloudTables.
Whether this is an issue depends upon the theme you are using, some will actually render the CloudTable in the post summary, while others don't:
If you want the CloudTable to appear in the excerpt regardless of the theme you are using, you can provide a custom excerpt for a post, and this can have short codes in it.
Edit the post in question and in the extra options on the right of the display find the excerpt input. Type in the summary for your post, and use a short code as described above. It will then appear on the home page as well as the actual post.