This repository has been archived on 2022-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
divi/includes/builder/templates/block-template-canvas.php

39 lines
1.0 KiB
PHP
Raw Normal View History

2021-12-07 11:08:05 +00:00
<?php
/**
2022-06-23 12:17:18 +00:00
* Modified block template canvas file to render Visual and Theme Builder layouts.
*
* @since 4.9.8
* @since 4.14.7 Remove block template HTML to only display TB Template.
*
* This block template canvas should be used only when TB Template (Header/Footer/Body)
* is active on current page. Otherwise, we have to use default Block Editor template.
*
* @see {ET_Builder_Block_Templates::get_custom_query_template}
2021-12-07 11:08:05 +00:00
*
* @package Divi
*/
get_header();
2022-06-23 12:17:18 +00:00
if ( is_singular() && have_posts() ) {
// If current page is singular, render the content normally.
// Template type: frontpage, home (page), page, paged, privacypolicy, single, singular.
while ( have_posts() ) {
the_post();
the_content();
}
} else {
/**
* Fires the main content on block template canvas.
*
* Use this hook to display custom output for non singular page.
*
* @since 4.14.7
*
* Template type: 404, archive, author, category, date, home (non-page), index, search, tag, taxonomy.
*/
do_action( 'et_block_template_canvas_main_content' );
}
2021-12-07 11:08:05 +00:00
get_footer();