To install this package using Composer, follow these steps:
-
Add the following to the
repositoriessection of yourcomposer.json:{ "type": "vcs", "url": "git@github.com:yardinternet/wp-live-content.git" } -
Install this package with Composer:
composer require yard/wp-live-content
-
Run the Acorn WP-CLI command to discover this package:
wp acorn package:discover
Live content is opt-in per post type, so publish the config file to declare which post types it applies to:
wp acorn vendor:publish --provider="Yard\LiveContent\LiveContentServiceProvider"This writes config/wp-live-content.php to your theme. List the post types there:
return [
'post-types' => [
'openpub-item',
],
];The post types you list here decide where the Stuur push bericht button shows up in the block editor. Without this file the package falls back to its own default, which only covers openpub-item.
From a Blade template:
<x-yard-live-content post-id="{{ $postId }}" />Editors send a push notification with the Stuur push bericht button under Status & visibility in the block editor.
