This extension aims to convert the event content submitted through Community Events to block editor format.
Note, this extension is still under development and NO ACTIVE SUPPORT is provided for it. If you would like to report a bug or a request, you can do it in the Issues section in the GitHub repository.
Setting up the extension is simple, just install it and activate it on your WordPress site, alongside The Events Calendar and Community Events.
There are no settings for the extension at the moment.
The following two settings are required to be enabled for the extension to work.
- Events > Settings > General > Activate Block Editor for Events
- Events > Settings > Community > Use visual editor for event descriptions
If these settings are not enabled, the extension will not function.
The plugin has two filters
Allows changing the HTM block markup, including adding and removing elements.
/**
* Remove the comments block.
*/
function my_custom_ce_blocks( $blocks, $data ) {
// Remove the comments block.
unset( $blocks['comments'] );
return $blocks;
}
add_filter( 'tec_labs_ce_block_template', 'my_custom_ce_blocks', 10, 2 );
Allows rearranging the order of the blocks based on the block slug.
Note: content_start
, content
, and content_end
should stay together.
You can omit content_start
and content_end
. The plugin will make an attempt to include them.
/**
* Rearrange the event blocks.
*/
function my_custom_ce_block_order( $order ) {
$order = [
'featured_image',
'organizer',
'venue',
'sharing',
'related',
'comments',
'datetime',
'content_start',
'content',
'content_end',
];
return $order;
}
add_filter( 'tec_labs_ce_block_order', 'my_custom_ce_block_order' );
The plugin will attempt the conversion for newly submitted events.
It will not work for events submitted in the past.
- Add a setting for the cutoff date which is now hard-coded to be October 1, 2023.