# ultimate-post/5.1.0/addons/beaver_builder/includes/frontend.php

Post Grid Gutenberg Blocks – PostX, version 5.1.0. 27 lines.

- Page: https://pluginprobe.com/plugins/ultimate-post/5.1.0/code/addons/beaver_builder/includes/frontend.php
- Raw: https://pluginprobe.com/plugins/ultimate-post/5.1.0/raw/addons/beaver_builder/includes/frontend.php
- Modified: 2026-10-04T09:06:16+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.1.0/code/addons/beaver_builder/includes/frontend.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) || exit;
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Included by Beaver Builder inside the module render method; variables are local.
$id = $settings->template;//phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
<div class="ultp-shortcode" data-postid="<?php echo esc_attr( $id ); ?>">
	<?php
	if ( $id ) {
		$args      = array(
			'p'         => $id,
			'post_type' => 'ultp_templates',
		);
		$the_query = new \WP_Query( $args );
		if ( $the_query->have_posts() ) {
			while ( $the_query->have_posts() ) {
				$the_query->the_post();
				the_content();
			}
			wp_reset_postdata();
		}
	} elseif ( isset( $_GET['fl_builder'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only Beaver Builder editor detection.
		//phpcs:ignore
			echo '<p style="text-align:center;">' . sprintf( esc_html__( 'Pick a Template from your saved ones. Or create a template from: %s.', 'ultimate-post' ) . ' ', '<strong><i>' . esc_html__( 'Dashboard > PostX > Saved Templates', 'ultimate-post' ) . '</i></strong>' ) . '</p>'; //phpcs:ignore

	}
	?>
</div>

```
