separating content of a page:
<?php get_header();?>
<?php
$content = get_the_content();
$blocks = parse_blocks( $content );
?>
<div class="container1 mt-5">
<?php render_block($blocks[0]); ?>
</div>
<div class="container2 mt-5">
<?php render_block($blocks[1]); ?>
</div>
<?php get_footer();?>
It gives me an empty page. What am I doing wrong?
check parse_blocks and render_block functions re exists in your theme/project You can comment out those line check that you getting page correctly or not
I do have my navigation bar etc rendered
Обсуждают сегодня