PluginProbe
Post Grid Gutenberg Blocks – PostX / 4.1.19
Post Grid Gutenberg Blocks – PostX v4.1.19
5.0.39 5.0.38 5.0.37 5.0.36 5.0.35 5.0.34 5.0.33 5.0.32 5.0.31 5.0.30 5.0.29 5.0.28 5.0.27 5.0.26 5.0.25 5.0.23 5.0.24 5.0.22 5.0.21 5.0.20 5.0.19 5.0.18 5.0.17 2.1.1 2.1.2 All 237 releases
ultimate-post / classes / template-without-title.php

template-without-title.php in Post Grid Gutenberg Blocks – PostX 4.1.19, at classes/template-without-title.php

67 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 $is_block_theme = wp_is_block_theme();
5
6 global $ULTP_HEADER_ID;
7 global $ULTP_FOOTER_ID;
8 $builder_active = ultimate_post()->get_setting('ultp_builder') != 'false';
9 $has_header = $builder_active ? $ULTP_HEADER_ID : '';
10 $has_footer = $builder_active ? $ULTP_FOOTER_ID : '';
11
12 if( $is_block_theme ) {
13 ?><!DOCTYPE html>
14 <html <?php language_attributes(); ?>>
15 <head>
16 <meta charset="<?php bloginfo( 'charset' ); ?>" />
17 <?php
18 wp_head();
19 ?>
20 </head>
21 <body <?php body_class(); ?>>
22 <?php wp_body_open();
23
24 if( !$has_header ) {
25 ob_start();
26 block_template_part('header');
27 $header = ob_get_clean();
28 echo '<header class="wp-block-template-part">'.$header.'</header>';
29 }
30 } else {
31 get_header();
32 }
33
34 do_action( 'ultp_before_content' );
35
36 $width = ultimate_post()->get_setting( 'container_width' );
37 $width = $width ? $width : '1140';
38 ?>
39 <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;">
40 <?php
41 while ( have_posts() ) : the_post();
42 the_content();
43 if ( comments_open() || get_comments_number() ) {
44 comments_template();
45 }
46 endwhile;
47 ?>
48 </div>
49
50 <?php
51 do_action( 'ultp_after_content' );
52 if( $is_block_theme ) {
53 ?>
54 </body>
55 </html>
56 <?php
57 if ( !$has_footer ) {
58 ob_start();
59 block_template_part('footer');
60 $footer = ob_get_clean();
61 echo '<footer class="wp-block-template-part">'.$footer.'</footer>';
62 }
63 wp_head();
64 wp_footer();
65 } else {
66 get_footer();
67 }