<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Nextpage
 */

$nextpage_page_meta = get_post_meta( get_queried_object_id(), 'nextpage_page_meta', true );

$nextpage_header_builder_id = ( !empty( $nextpage_page_meta[ 'header-builder' ] ) ? $nextpage_page_meta[ 'header-builder' ] : nextpage_get_option( 'header-builder' ) );

?>
<div class="nextpage-header-builder">
    <?php 

    $nextpage_header_builder = \Elementor\Plugin::instance();
    $nextpage_header_builder_content = $nextpage_header_builder->frontend->get_builder_content( $nextpage_header_builder_id );

    echo sprintf(__('%s', 'nextpage'), $nextpage_header_builder_content); // phpcs:ignore WordPress.WP.I18n.NoEmptyStrings
     ?>
</div>