$frontPageId = get_option('page_on_front');
add_action('widgets_init', 'glm_quicksite_widget_init');
+define("CHAMBER_BLOCKS", 771);
+define("DEFAULT_BLOCKS", 772);
+
if (!function_exists('glm_quicksite_widget_init')) {
function glm_quicksite_widget_init()
<?php if(function_exists('fetch_all_glm_blocks')):?>
-<?php $blocks = fetch_all_glm_blocks();?>
+<?php
+$page_template = get_page_template_slug($post->ID);
+switch ($page_template) {
+case 'front-page.php':
+ $defaultBlockGroup = DEFAULT_BLOCKS;
+ break;
+case 'chamber-template.php':
+ $defaultBlockGroup = CHAMBER_BLOCKS;
+ break;
+default:
+ $defaultBlockGroup = DEFAULT_BLOCKS;
+ break;
+}
+?>
+<?php $blocks = fetch_all_glm_blocks($defaultBlockGroup);?>
<?php $count = 1; ?>
<div class="blocks">
<?php foreach ($blocks as $block):?>