We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f6d232 commit 6989b97Copy full SHA for 6989b97
themes/osi/functions.php
@@ -449,4 +449,25 @@ function save_form_data_to_cpt($contact_form) {
449
} else {
450
error_log('WPCF7_Submission instance is null.');
451
}
452
-}
+}
453
+
454
455
456
457
458
+function osi_register_block_template() {
459
+ $post_type = 'page'; // Apply to the "page" post type
460
+ $template_slug = 'ai-template';
461
+ $template_file = 'templates/ai-template.html'; // Path to your block template file
462
463
+ // Register the block template
464
+ register_block_template(
465
+ $post_type,
466
+ [
467
+ 'title' => __('AI Template', 'osi'),
468
+ 'slug' => $template_slug,
469
+ 'path' => get_theme_file_path($template_file),
470
+ ]
471
+ );
472
473
+add_action('init', 'osi_register_block_template');
0 commit comments