If you look at the beginning of this post, I am taking an HTML/CSS site and converting it over to WP. I really don’t want to make a child theme as there is a lot of stuff I don’t want in there. This is a business site that will be handled by the client after I do my stuff. I have watched a few video tutorials, read a few tutorials online, and have a few books (including one from Sitepoint). The problem I am currently having is in the original site there are left and right sidebars. They are not showing up in WP. I have tweaked the original code I posted at the beginning so here is the new code…
header.php
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else { bloginfo('description'); } ?> — <?php bloginfo('name'); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen, projection, TV" />
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/bigScreen.css" type="text/css" media="screen and (min-width:66em)"/>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/smallScreen.css" type="text/css" media="screen and (max-width:751px)"/>
<link rel="stylesheet"href="<?php bloginfo('template_url'); ?>/css/flexslider.css">
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="<?php bloginfo('template_url'); ?>/js/jquery.flexslider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('.flexslider').flexslider();
});
</script>
<?php wp_head(); ?>
</head>
<body>
<div id="pageWrapper">
<h1> Centennial Airport Community Noise Roundtable </h1>
<ul id="mainMenu">
<li><a href="index.php">Home</a></li>
<li><a href="noise101.php">Noise 101</a></li>
<li><a href="meeting.php">Meeting Recaps</a></li>
<li><a href="workplan.php">Workplan</a></li>
<li><a href="about.php">About Us</a></li>
<li><a href="newsletter.php">Newsletter</a></li>
</ul>
<hr />
<div class="flexslider">
<ul class="slides">
<li>
<img src="wp-content/themes/cacnr/images/1.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/2.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/3.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/4.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/5.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/6.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/7.png" />
</li>
<li>
<img src="wp-content/themes/cacnr/images/8.png" />
</li>
</ul>
</div>
<hr />
<div id="columnWrapper">
<div id="contentWrapper">
index.php
<div id="columnWrapper">
<div id="contentWrapper">
<?php define('WP_USE_THEMES', false); get_header(); ?>
<div id="columnWrapper">
<div id="contentWrapper">
<div id="content">
<h2>Recent Posts</h2>
<div class="post">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<!-- .post --></div>
<!-- #content, #contentWrapper --></div>
</div>
<?php get_sidebar(left); ?>
<?php get_sidebar(right); ?>
<?php get_footer(); ?>
sidebar_left.php
<div id="sideBarWrapper">
<div id="sidebar_left">
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
<h2>News</h2>
<div class="subSection"> <img src="../images/placeHolder.png" alt="placeholder image" class="plate" />
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<!-- .subSection --></div>
<div class="subSection"> <img src="../images/placeHolder.png" alt="placeholder image" class="plate" />
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<!-- .subSection --></div>
<?php endif; ?>
<!-- #sidebar_left --></div>
<?php wp_sidebar(left); ?>
sidebar_right.php
<div id="sidebar_right">
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
(<?php _e('Search'); ?>
<div id="sideLinks" class="subSection">
<h2>Links</h2>
<ul>
<li><a href="http://webtrak.bksv.com/den" target="_blank">Track and view all aircraft in the metro area</a></li>
<li><a href="http://www.centennialairport.com/Complaints" target="_blank">Homepage for Centennial Airport</a></li>
<li><a href="http://www.centennialairport.com/" target="_blank">Centennial Airport Home Page</a></li>
<li><a href="4. http://aviation-noise.org/" target="_blank">National Organization to Insure a Sound Controlled Environment</a></li>
</ul>
</div>
<div id="calendar">
<h2>Calendar</h2> <!--this is where the calendar plugin will go-->
<div id="RSS">
<h2>RSS Feed</h2> <!--this is where the RSS feed plugin will go-->
<!-- #RSS --></div>
<!-- #sidebar_right --></div>
<!-- #sideBarWrapper --></div>
<?php endif; ?>
<!-- #columnWrapper --></div>
<?php wp_sidebar(right); ?>
<hr />
footer.php
<div id="footer">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="noise101.html">Noise 101</a></li>
<li><a href="meeting.html">Meeting Recaps</a></li>
<li><a href="workplan.html">Workplan</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="newsletter.html">Newsletter</a></li>
</ul>
<hr />
<div class="address"> Arapahoe County Public Airport Authority<br />
7800 South Peoria Street, Box G-1<br />
Englewood, CO 80112<br />
(303) 790-0598 </div>
<hr />
<img src="wp-content/themes/cacnr/images/cacnr_logo.png" alt="CACNR Logo" /><br />
© 2012 Centennial Airport Community Noise Roundtable
<hr />
<div class="designBy"> Website Design By <a href="http://foxdenwebsolutions.com" target="_blank">Foxden Web Solutions</a> </div>
<!-- #footer --></div>
<!-- #pageWrapper --></div>
<?php wp_footer(); ?>
</body>
</html>
Now I don’t know what is causing the sidebars not to show because I created a functions.php page and added this code
<?php
if ( function_exists('register_sidebar') )
register_sidebars(2);
(array(
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="title">',
'after_title' => '</div>',
));
?>
I don’t want the customary pages, archives, categories, and meta to be showing up at all. They are not anywhere in my code but yet they are there. You can see images of the problems in the attached image.