Forums
Home / Theme: Spine / Hiding the primary sidebar from all pages but the front
(@relationshipchef)
10 years, 3 months ago
I’m having difficulty figuring this out, as the code is in footer. See below
I’ve even tried my hand at creating a blank page, but, funny enough, nothing displays but the sidebar. 🙁
Thanks! P.S. I haven’t included the link to the site as it’s not live yet.
‘ <?php if(! is_page_template(‘page-templates/front-page.php’)){ get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. get_sidebar( ‘secondary’ ); // Loads the sidebar-secondary.php template. } ?>
</div><!– #main –>
<?php get_sidebar( ‘subsidiary’ ); // Loads the sidebar-subsidiary.php template. ?>
<?php get_template_part( ‘menu’, ‘subsidiary’ ); // Loads the menu-subsidiary.php template. ?>
<footer id=”footer”>
<div class=”wrap”> <hr> <div class=”footer-content”> <?php echo apply_atomic_shortcode( ‘footer_content’, ‘<p class=”credit”>’ . __( ‘Copyright © [the-year] [site-link]. Powered by [wp-link] and [theme-link].’, ‘spine2’ ) . ‘</p>’ ); ?> </div><!– .footer-content –>
</div>
</footer><!– #footer –> </div><!– #container –> <?php wp_footer(); // wp_footer ?>
</body> </html> ‘
Trying this conditional statement, is this right? (Doesn’t seem to work, though)…
<?php if(!is_page('10')) get_template_part( 'menu', 'secondary' ); ?>
Solved it on my own. Code above was right. It was simply getting overwritten by header.php. Copied header.php into the child theme, and, viola!