# JPKCom Theme is LiveCanvas friendly — Guide & Tips

> Mark any WordPress theme as LiveCanvas-compatible — installation, Bootstrap version and the required empty page template.

Source: https://www.jpkc.com/db/en/guides/jpkcom-is-lc-friendly/

JPKCom Theme is LiveCanvas friendly tells [LiveCanvas](https://docs.livecanvas.com/which-themes-with-livecanvas/) that your active theme is LiveCanvas-compatible. The plugin provides the helper functions `lc_theme_is_livecanvas_friendly()` and `lc_theme_bootstrap_version()`, so you don't have to add these functions to your theme yourself.

## Guide

### Requirements

- WordPress **6.9** or newer (tested up to 7.0)
- PHP **8.3** or newer
- The **LiveCanvas** plugin (declared in the header as `Requires Plugins: livecanvas`) must be active

### Installation

1. In your admin panel, go to **Plugins → Add New** and click **Upload Plugin**.
2. Choose the plugin's ZIP file and click **Install Now**.
3. Make sure the **LiveCanvas** plugin is activated.
4. Click **Activate**.
5. Create a subdirectory called `page-templates` in your theme folder.
6. In it, create a file `empty.php` with the following content:

```php
<?php
/* Template Name: Empty */

defined( 'ABSPATH' ) || exit;

get_header();

while ( have_posts() ) :
the_post();
the_content();
endwhile;

get_footer();
```

### Bootstrap version

`lc_theme_bootstrap_version()` tells LiveCanvas which Bootstrap version your theme uses. Per the README example, the function returns `5.3` for the latest Bootstrap; alternatively `5` (Bootstrap 5.0–5.2) or `4` (Bootstrap 4) are possible.

## Tips & Tricks

- **The empty template is required:** Without `page-templates/empty.php` in your theme, LiveCanvas lacks the blank template it builds its content on. Create it exactly as shown in the README.
- **Helpers are guarded:** Since version 1.0.4 the LiveCanvas helper functions are protected with `function_exists()` — so they won't collide if your theme already defines the same functions.
- **Adjust the Bootstrap version:** Set the return value of `lc_theme_bootstrap_version()` to the Bootstrap version your theme actually uses.
- **Reproducible updates:** Since version 1.0.4 the plugin uses secure self-hosted updates via GitHub with SHA256 checksums and runs with `declare(strict_types=1)`.

## Further reading

- Source code on GitHub: <https://github.com/JPKCom/jpkcom-is-lc-friendly>
- API documentation (PHPDoc): <https://jpkcom.github.io/jpkcom-is-lc-friendly/docs/>
- [Which themes work with LiveCanvas?](https://docs.livecanvas.com/which-themes-with-livecanvas/)
- [This project's changelog](https://www.jpkc.com/db/en/changelog/jpkcom-is-lc-friendly/)

