Title: Bug Report: Content Block — Single template does not render
Last modified: August 7, 2026

---

# Bug Report: Content Block — Single template does not render

 *  [euzebiobatista](https://wordpress.org/support/users/euzebiobatista/)
 * (@euzebiobatista)
 * [2 weeks, 1 day ago](https://wordpress.org/support/topic/bug-report-content-block-single-template-does-not-render/)
 * Environment
    - **Plugin**: Blocksy Companion Pro
    - **Theme**: Blocksy
 * Description
 * When creating a Content Block with **Template Type = Single** and setting a display
   condition (e.g. `Include {CPT} Single`), the single page for that post type **
   is not overridden** by the Content Block. The original Gutenberg content is still
   displayed instead.
 * The same scenario works perfectly for **Template Type = Archive**. Root Cause
 * File: `framework/premium/features/content-blocks/templates.php`
 * Class: `ContentBlocksTemplates`
 * For **single** templates, the constructor only:
    1. Sets the global `$blocksy_template_output = true` (line 25)
    2. Adjusts `page_structure` via the `blocksy:global:page_structure` filter (lines
       133-163)
 * But **it never hooks into the filter that actually replaces the page content**.
   The Blocksy theme provides two filters for this:
    - `blocksy:single:canvas:custom-output` — in `template-parts/single.php:24`,
      replaces the entire single page
    - `blocksy:single:content:custom-output` — in `inc/components/single/content-
      helpers.php:253`, replaces only the `the_content()` area
 * **Neither is used by the plugin for single templates.**
 * Compare with the **archive** handling, which works correctly (same file, lines
   53-94): it hooks into `blocksy:posts-listing:canvas:custom-output` and returns`
   blocksy_companion_render_content_block($maybe_hook_id)`. Current code (single—
   incomplete):
 *     ```wp-block-code
       // templates.php, lines 11-27 (that's all there is for single)
       add_action('wp', function () {
           if (! is_singular() && ! is_single()) {
               return;
           }
   
           if (
               function_exists('blocksy_companion_get_content_block_that_matches')
               &&
               blocksy_companion_get_content_block_that_matches([
                   'template_type' => 'single',
                   'template_subtype' => 'canvas'
               ])
           ) {
               global $blocksy_template_output;
               $blocksy_template_output = true;
           }
       });
       ```
   
 * Archive code (complete — works):
 *     ```wp-block-code
       // templates.php, lines 53-94
       add_filter(
           'blocksy:posts-listing:canvas:custom-output',
           function ($output) {
               // ... nothing_found check ...
   
               $maybe_hook_id = null;
   
               if (
                   blocksy_companion_get_content_block_that_matches([
                       'template_type' => 'archive',
                       'template_subtype' => 'canvas'
                   ])
               ) {
                   $maybe_hook_id = blocksy_companion_get_content_block_that_matches([
                       'template_type' => 'archive',
                       'template_subtype' => 'canvas'
                   ]);
               }
   
               if (! $maybe_hook_id) {
                   return $output;
               }
   
               global $blocksy_template_output;
               $blocksy_template_output = true;
   
               return blocksy_companion_render_content_block($maybe_hook_id);
           }
       );
       ```
   
 * Suggested Fix
 * Add a hook into `blocksy:single:canvas:custom-output` inside `ContentBlocksTemplates::
   __construct()`, following the exact same pattern already used for archives:
 *     ```wp-block-code
       add_filter(
           'blocksy:single:canvas:custom-output',
           function ($output) {
               $maybe_hook_id = null;
   
               if (
                   blocksy_companion_get_content_block_that_matches([
                       'template_type' => 'single',
                       'template_subtype' => 'canvas'
                   ])
               ) {
                   $maybe_hook_id = blocksy_companion_get_content_block_that_matches([
                       'template_type' => 'single',
                       'template_subtype' => 'canvas'
                   ]);
               }
   
               if (! $maybe_hook_id) {
                   return $output;
               }
   
               global $blocksy_template_output;
               $blocksy_template_output = true;
   
               return blocksy_companion_render_content_block($maybe_hook_id);
           }
       );
       ```
   
 * Workaround
 * Until the fix is shipped, the following snippet can be added via a child theme’s`
   functions.php` or a code snippets plugin:
 *     ```wp-block-code
       add_filter('blocksy:single:canvas:custom-output', function ($output) {
           if (! function_exists('blocksy_companion_get_content_block_that_matches')) {
               return $output;
           }
   
           $hook_id = blocksy_companion_get_content_block_that_matches([
               'template_type'    => 'single',
               'template_subtype' => 'canvas',
           ]);
   
           if (! $hook_id) {
               return $output;
           }
   
           global $blocksy_template_output;
           $blocksy_template_output = true;
   
           return blocksy_companion_render_content_block($hook_id);
       });
       ```
   

Viewing 1 replies (of 1 total)

 *  [Eduard](https://wordpress.org/support/users/cteduard/)
 * (@cteduard)
 * [2 weeks, 1 day ago](https://wordpress.org/support/topic/bug-report-content-block-single-template-does-not-render/#post-18987458)
 * Hello [@euzebiobatista](https://wordpress.org/support/users/euzebiobatista/)
 * Thank you for reaching out!
 * These forums are dedicated to Blocksy Free users. Since you’re using Blocksy 
   Pro, we kindly ask that you contact us through our official support channel here:
 * 👉 [https://creativethemes.com/blocksy/support/](https://creativethemes.com/blocksy/support/)
 * Our support team will be happy to assist you promptly.
 * Thanks for your understanding, and have a great day!

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbug-report-content-block-single-template-does-not-render%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/blocksy-companion/assets/icon-256x256.jpg?rev=3145156)
 * [Blocksy Companion](https://wordpress.org/plugins/blocksy-companion/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/blocksy-companion/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/blocksy-companion/)
 * [Active Topics](https://wordpress.org/support/plugin/blocksy-companion/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/blocksy-companion/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/blocksy-companion/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Eduard](https://wordpress.org/support/users/cteduard/)
 * Last activity: [2 weeks, 1 day ago](https://wordpress.org/support/topic/bug-report-content-block-single-template-does-not-render/#post-18987458)
 * Status: not resolved