Hello guys,
We have created a custom post type and we’d like to remove the footer entirely.
The template we want to reproduce is Icon’s Template-Blank-5.php with no-container, a header and no footer.
<?php
// =============================================================================
// VIEWS/ICON/TEMPLATE-BLANK-5.PHP (No Container | Header, No Footer)
// -----------------------------------------------------------------------------
// A blank page for creating unique layouts.
// =============================================================================
get_header();
?>
<div class="x-main full" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-wrap">
<?php x_get_view( 'global', '_content', 'the-content' ); ?>
</div>
</article>
<?php endwhile; ?>
</div>
<?php x_get_view( 'icon', '_template-blank-sidebar' ); ?>
<?php
if ( apply_filters( 'x_legacy_cranium_footers', true ) ) {
x_get_view( 'global', '_footer' );
} else {
get_footer();
}
?>
Assuming our CPT slug is “story” we have added in our child-theme a file “single-story.php” where we have added the following code:
<?php
// =============================================================================
// VIEWS/ICON/WP-SINGLE.PHP
// -----------------------------------------------------------------------------
// Single post output for Icon.
// =============================================================================
get_header();
?>
<div class="x-main full" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-wrap" style="padding:0;border-bottom:0;">
<?php do_action( 'x_before_the_content_begin' ); ?>
<div class="entry-content content" style="margin:0;padding:0;">
<?php do_action( 'x_after_the_content_begin' ); ?>
<?php the_content(); ?>
<?php do_action( 'x_before_the_content_end' ); ?>
</div>
<?php do_action( 'x_after_the_content_end' ); ?>
</div>
</article>
<?php endwhile; ?>
</div>
<?php
if ( apply_filters( 'x_legacy_cranium_footers', true ) ) {
x_get_view( 'global', '_footer' );
} else {
get_footer();
}
?>
However we keep having the default global footer added in our CPT.
If I remove get_footer(); the page is broken (admin bar doesn’t display).
Am I missing something?
Thank you!