# ablocks/2.11.0/addons/theme-builder/traits/render-content.php

aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder &amp; Animation Builder, version 2.11.0. 19 lines.

- Page: https://pluginprobe.com/plugins/ablocks/2.11.0/code/addons/theme-builder/traits/render-content.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.11.0/raw/addons/theme-builder/traits/render-content.php
- Modified: 2025-04-17T15:01:18+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/ablocks/2.11.0/code/addons/theme-builder/traits/render-content.php#L10-L20`.

```php
<?php
namespace ABlocksThemeBuilder\Traits;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

trait RenderContent {
	public function get_rendered_block_content_by_id( $post_id ) {
		$post = get_post( $post_id );

		if ( $post && $post->post_status === 'publish' ) {
			return apply_filters( 'the_content', $post->post_content );
		}

		return '';
	}
}

```
