code to suppress sidebar on homepage
-
I’m using a theme I developed myself. I am using the “static home page” plugin. I want the sidebar to appear on every page BUT the home page. I’m not a programmer, so I think my PHP skills are not up to snuff for this.
In the page.php template, the “get_sidebar” call is working fine.
I’m trying to alter my sidebar.php file so that nothing will be displayed if it’s the home page, and the entire sidebar will be displayed if it’s any other page. My current sidebar.php looks like:
<?php if (is_home()) { ?>
echo “”;
<?php } else { ?>
<div id=”sidebar_content”>
<!– WPG2 Image Block Coding –>
<?php print g2_sidebarimageblock(); ?>
<!– end WPG2 Image Block Coding –>-
<!– EventCalendar Coding –>
<?php _e(‘Shows & Class Schedule’); ?>
<?php ec3_get_events(5); ?>
<!– end EventCalendar Coding –></div>
<?php } ?>I’d be most appreciative of any advice!
You can see my site, which is under construction, at https://www.mikesouthern.com/wp/
- The topic ‘code to suppress sidebar on homepage’ is closed to new replies.