A plugin is available to insert AlgebraKiT exercises into a WordPress page. The plugin provides two methods to insert an AlgebraKiT exercise:
- If your Wordpress uses the Gutenberg plugin and your Wordpress version is at least 5.0, you can use the custom AlgebraKiT block;
- Otherwise, you can use the AlgebraKiT shortcode.
For this guide, we assume that you have a basic understanding of WordPress and that your account is authorized to add new plugins. If not, these steps need to be executed by an administrator who has the correct permissions.
- Go to the GitHub repository for the plugin and download the plugin as a ZIP file. using the "Clone or download" button.
- Follow the instructions on the Wordpress support website. Automatic installation is not supported for this plugin, therefore the instructions in the Manual Upload via WordPress Admin or Manual Plugin Installation sections should be followed. After completing this process, the plugin should be activated and visible on the Plugin page of your WordPress site.
Go to the AlgebraKiT plugin settings page, which should be located under "AlgebraKiT" in your WordPress settings menu. Here, you can set the API key that the plugin will use. Paste your API key into the field and save.
Using the Gutenberg block editor
- Create a new page or edit an existing one, and add a new block of the type "AlgebraKiT".
A small form with two input fields will appear. Input your Exercise ID. You can leave the "Major Version" field empty.
Save your page and preview it. The AlgebraKiT exercise will be created.
Using the AlgebraKiT shortcode
A shortcode is a textual instruction for Wordpress within square brackets. You can simply type it in a text block and Wordpress will replace it with an AlgebraKiT exercise.
The format of the shortcode is as follows:
[akit-exercise exercise-id="..." version="..." solution-mode=".."][/akit-exercise]
The attributes are:
|exercise-id||Required. The unique Exercise ID of the exercise.|
|version||Optional. If you have multiple versions of the same exercise, this denotes the major version id.|
|solution-mode||Optional. If set to 'true', the solution of the exercise will be shown.|