# ultimate-post/5.0.23/classes/template-without-title.php

Post Grid Gutenberg Blocks – PostX, version 5.0.23. 70 lines.

- Page: https://pluginprobe.com/plugins/ultimate-post/5.0.23/code/classes/template-without-title.php
- Raw: https://pluginprobe.com/plugins/ultimate-post/5.0.23/raw/classes/template-without-title.php
- Modified: 2026-06-04T11:21:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ultimate-post/5.0.23/code/classes/template-without-title.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) || exit;

$is_block_theme = wp_is_block_theme();

global $ULTP_HEADER_ID;
global $ULTP_FOOTER_ID;
$builder_active = ultimate_post()->get_setting( 'ultp_builder' ) != 'false';
$has_header     = $builder_active ? $ULTP_HEADER_ID : '';
$has_footer     = $builder_active ? $ULTP_FOOTER_ID : '';

if ( $is_block_theme ) {
	?><!DOCTYPE html>
	<html <?php language_attributes(); ?>>
	<head>
		<meta charset="<?php bloginfo( 'charset' ); ?>" />
		<?php
		wp_head();
		?>
	</head>
	<body <?php body_class(); ?>>
	<?php
	wp_body_open();

	if ( ! $has_header ) {
		ob_start();
		block_template_part( 'header' );
		$header = ob_get_clean();
		echo '<header class="wp-block-template-part">' . $header . '</header>';
	}
} else {
	get_header();
}

do_action( 'ultp_before_content' );

$width = ultimate_post()->get_setting( 'container_width' );
$width = $width ? $width : '1140';
?>
<div class="ultp-template-container" style="margin:0 auto;max-width:<?php echo esc_attr( $width ); ?>px; padding: 0 15px; width: -webkit-fill-available; width: -moz-available;">
	<?php
	while ( have_posts() ) :
		the_post();
		the_content();
		if ( comments_open() || get_comments_number() ) {
			comments_template();
		}
		endwhile;
	?>
</div>

<?php
do_action( 'ultp_after_content' );
if ( $is_block_theme ) {
	?>
	</body>
	</html>
	<?php
	if ( ! $has_footer ) {
		ob_start();
		block_template_part( 'footer' );
		$footer = ob_get_clean();
		echo '<footer class="wp-block-template-part">' . $footer . '</footer>';
	}
	// wp_head(); // all ready wp head declared in header, i can not find any conflict to check that, if you find any conflict for removing then use it
	wp_footer();
} else {
	get_footer();
}

```
