Hi Lilia,
Sorry if it does not work. There was a typo error in the code. You should be using this:
<?php
// =============================================================================
// TEMPLATE NAME: TEST
?>
<?php get_header(); ?>
<div class="x-container max width offset">
<div class="<?php x_main_content_class(); ?> mao ni" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( 'integrity', 'content', 'page' );
$fields = get_fields();
//$banner = $fields ["banner"]; echo banner;
$intro_title = $fields ["intro_title"];
echo $intro_title;
$subtitle = $fields ["intro_subtitle"];
echo $intro_subtitle;
$hide_title = $fields ["hide_title"];
echo $hide_title;
$rd_img_id = $fields ["rd_image"];
$rd_img_url = wp_get_attachment_image_src($rd_img_id, 'large', false);
$rd_img = $rd_img_url[0];
$rd_secton_heading = $fields ["subtitle"];
$rd_areas = $fields ["areas_of_high_development"];
$rd_content = $fields ["content_area"];
$rd_bottom_content = $fields ["bottom_content"];
$rd_contact_img_id = $fields ["contact_image"];
$rd_contact_img_url = wp_get_attachment_image_src($rd_contact_img_id, 'large', false);
$rd_contact_img = $rd_contact_img_url[0];
$rd_contact_name = $fields ["contact_name"];
$rd_contact_phone = $fields ["contact_phone_number"];
$contact_form = $fields["contact_form"];
$form_object = $contact_form;
gravity_form_enqueue_scripts($form_object['id'], true);
$options = get_fields('options');
$why_title = $options ["why_honest_title"];
$why_content = $options ["why_honest_content"];
$socials = $fields[ 'socials' ];
?>
<?php x_get_view( 'global', '_comments-template' ); ?>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
</div>
Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After setting up and activation the child theme, place test.php in the child theme’s folder instead.
You might probably wonder why the output is outside the page entry wrap. That is because the page entry wrap is in this line: <?php x_get_view( 'integrity', 'content', 'page' );
. What you will do is to update your contents using this code instead:
<?php
// =============================================================================
// TEMPLATE NAME: TEST
?>
<?php get_header(); ?>
<div class="x-container max width offset">
<div class="<?php x_main_content_class(); ?> mao ni" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="entry-featured">
<?php x_featured_image(); ?>
</div>
<?php endif; ?>
<div class="entry-wrap">
<?php if ( is_singular() ) : ?>
<?php if ( $disable_page_title != 'on' ) : ?>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php endif; ?>
<?php else : ?>
<header class="entry-header">
<h2 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
</h2>
</header>
<?php endif; ?>
<?php x_get_view( 'global', '_content' ); ?>
<?php
$fields = get_fields();
//$banner = $fields ["banner"]; echo banner;
$intro_title = $fields ["intro_title"];
echo $intro_title;
$subtitle = $fields ["intro_subtitle"];
echo $intro_subtitle;
$hide_title = $fields ["hide_title"];
echo $hide_title;
$rd_img_id = $fields ["rd_image"];
$rd_img_url = wp_get_attachment_image_src($rd_img_id, 'large', false);
$rd_img = $rd_img_url[0];
$rd_secton_heading = $fields ["subtitle"];
$rd_areas = $fields ["areas_of_high_development"];
$rd_content = $fields ["content_area"];
$rd_bottom_content = $fields ["bottom_content"];
$rd_contact_img_id = $fields ["contact_image"];
$rd_contact_img_url = wp_get_attachment_image_src($rd_contact_img_id, 'large', false);
$rd_contact_img = $rd_contact_img_url[0];
$rd_contact_name = $fields ["contact_name"];
$rd_contact_phone = $fields ["contact_phone_number"];
$contact_form = $fields["contact_form"];
$form_object = $contact_form;
gravity_form_enqueue_scripts($form_object['id'], true);
$options = get_fields('options');
$why_title = $options ["why_honest_title"];
$why_content = $options ["why_honest_content"];
$socials = $fields[ 'socials' ];
?>
</div>
</article>
<?php x_get_view( 'global', '_comments-template' ); ?>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
</div>
We would loved to know if this has work for you. Thank you.