<repo_name>louiemd/altwebservices<file_sep>/functions.php
<?php

// This theme uses wp_nav_menu() in one location.
register_nav_menu( 'primary', __( 'Primary Menu', 'main-nav' ) );

function astro_add_dropdown_class($classes, $item) {
    global $wpdb;
    $has_children = $wpdb->get_var("
            SELECT COUNT(meta_id) 
            FROM wp_postmeta 
            WHERE meta_key='_menu_item_menu_item_parent'
            AND meta_value='".$item->ID."'
        ");
    // add the class dropdown to the current list
    if ($has_children > 0) array_push($classes,'dropdown'); 
    return $classes;
}
 
add_filter( 'nav_menu_css_class', 'astro_add_dropdown_class', 10, 2);


if ( function_exists('register_sidebar') ) {

	register_sidebar(array(
		'before_widget' => '<div id="%1$s" class="widget well %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h4 class="widgettitle"><em>',
		'after_title' => '</em></h4>',
	));
}

// Post thumbnail

if ( function_exists( 'add_theme_support' ) ) { 
	add_theme_support( 'post-thumbnails' );
	set_post_thumbnail_size( 118, 118, true ); // default Post Thumbnail dimensions (cropped)

}<file_sep>/header.php
<!DOCTYPE html>
<html>
  <head>
    <title>
    	<?php if (function_exists('is_tag') && is_tag()) {
		          single_tag_title('Tag Archive for &quot;'); echo '&quot; - ';
		    } elseif (is_archive()) {
		          wp_title(''); echo ' Archive - ';
		    } elseif (is_search()) {
		          echo 'Search for &quot;'.wp_specialchars($s).'&quot; - ';
		    } elseif (!(is_404()) && (is_single()) || (is_page())) {
		          wp_title(''); echo ' - ';
		    } elseif (is_404()) {
		          echo 'Not Found - ';
		    }
		    if (is_home()) {
		          bloginfo('name'); echo ' - '; bloginfo('description');
		    } else {
		          bloginfo('name');
		    }
		    if ($paged > 1) {
		          echo ' - page '. $paged;
		    } ?>

    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="<?php bloginfo('stylesheet_directory'); ?>/css/bootstrap.min.css" rel="stylesheet" media="screen">
	<link href="<?php bloginfo('stylesheet_directory'); ?>/css/bootstrap-responsive.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
	<?php wp_head(); ?>
  </head>
  <body <?php body_class(); ?>>
	
	<div id="header">
		<div class="container">
        	<h1 class="pull-left"><a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo2.png" alt="<?php bloginfo('name'); ?>"></a></h1>
      		
			<?php
			
			wp_nav_menu( array(
			'menu'            => 'Primary Menu',
			'theme_location' => '',
			'container' =>false,
			'menu_class' => '',
			'echo' => true,
			'before' => '',
			'after' => '',
			'link_before' => '',
			'link_after' => '',
			'depth' => 0,
			'items_wrap' => '<ul class="nav nav-pills pull-right">%3$s</ul>'
			));
			
			?>
		</div>
	</div> <!-- end header -->

		
	<?php if(is_front_page()) { ?>	
		
	<!-- Carousel
	  ================================================== -->
	  <div id="myCarousel" class="carousel slide">
	    <div class="container">	
			  <div class="carousel-inner">
		        <div class="item active">
					<img src="<?php bloginfo('stylesheet_directory'); ?>/images/altweb-slider-1.png" alt= "" />
		        </div> <!-- item -->
		        <div class="item">
		          	<img src="<?php bloginfo('stylesheet_directory'); ?>/images/altwebSEOSlide2.png" alt= "" />
		        </div> <!-- item -->
		        <div class="item">
		          	<img src="<?php bloginfo('stylesheet_directory'); ?>/images/altwebWebDevSlide2.png" alt= "" />
		        </div> <!-- item -->
		      </div> <!-- carousel-inner -->
		      <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
		      <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
		  </div>
	  </div><!-- /.carousel -->

			<?php } elseif (is_404()) { ?>
				
					<div id="masthead">
						 <div class="container">
						 	<h1>404 Page</h1>
						 </div>
					</div>
				
			<?php } else { ?>

			<div id="masthead">
				 <div class="container">
				 	<h1><?php the_title(); ?></h1>
				 </div>
			</div>

		<?php } ?><file_sep>/page.php


 <?php get_header(); ?>

<!-- Example row of columns -->
<div id="contentpart">
	<div class="container">
		<div class="row-fluid">
			<div class="span8">
				
				<?php if(is_front_page()): ?>
					<h2 style="margin-bottom:30px"><em><?php the_title(); ?></em></h2>
				<?php endif; ?>
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>			
					<?php the_content(); ?>
				<?php endwhile; endif; ?>
			
			</div>
			<div class="span4">
					<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?><?php endif; ?>								
			</div>
			
	    </div> <!-- row-fluid -->
	</div> <!-- container -->
</div> <!-- contentpart -->

<?php get_footer(); ?><file_sep>/single.php


 <?php get_header(); ?>

	

<!-- Example row of columns -->
<div id="contentpart">
	<div class="container">
		<div class="row-fluid">
			<div class="span8">
				
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
					<h2 class="bottomElement"><?php the_title(); ?></h2>
					<p class="meta">
						<em><?php the_date(); ?> by <?php the_author() ?></em>
					</p>
					<?php the_content(); ?>
					<?php comments_template(); ?>
				<?php endwhile; else: ?>
					<p>Sorry, no posts matched your criteria.</p>
				<?php endif; ?>
									
									
									
			</div>
			<div class="span4">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?><?php endif; ?>					
			</div>
			
	    </div> <!-- row-fluid -->
	</div> <!-- container -->
</div> <!-- contentpart -->

<?php get_footer(); ?><file_sep>/footer.php
<div class="subfooter">
    <div class="container">	
		<div class="row-fluid">		
	        <div class="span4" style="margin-left:0">
				<h4>Recent Works</h4>
				<div style="margin-left:0" class="span5">
					<div class="thumbnail">
  				      <img style="width: 119px;" data-src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/holder/holder.js/300x200" src="<?php bloginfo('stylesheet_directory'); ?>/images/thumb1.png" alt="">
  				    </div>
					
				</div>
				<div class="span5">
					<div class="thumbnail">
  				      <img style="width: 119px;" data-src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/holder/holder.js/300x200" src="<?php bloginfo('stylesheet_directory'); ?>/images/thumb1.png" alt="">
  				    </div>
					
				</div>
				
				<div class="clearfix"></div>
				<p></p>
				<div style="margin-left:0" class="span5">
					<div class="thumbnail">
  				      <img style="width: 119px;" data-src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/holder/holder.js/300x200" src="<?php bloginfo('stylesheet_directory'); ?>/images/thumb1.png" alt="">
  				    </div>
				</div>
				<div class="span5">
					<div class="thumbnail">
  				      <img style="width: 119px;" data-src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/holder/holder.js/300x200" src="<?php bloginfo('stylesheet_directory'); ?>/images/thumb1.png" alt="">
  				    </div>	
				</div>
				
				<div class="clearfix"></div>
				<h3><a href="#" class="btn btn-info btn-medium">View our portfolio »</a></h3>
	          <!-- <h3>Champ Soft</h3>    
	          				    <div class="thumbnail">
	          				      <img style="width: 297px; height: 180px;" data-src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/holder/holder.js/300x200" src="<?php bloginfo('stylesheet_directory'); ?>/images/thumb1.png" alt="">
	          				    </div>
	          				  	<p>Some descriptions here</p>  
	          					<p><a class="btn" href="#">View details &raquo;</a></p> -->
	        </div>
	        <div class="span4">
	          	<h4>Newsletter</h4>
	         	<form>
	         		<fieldset>
						<ul class="cleanform">
	         			<li><label>Name:</label></li>
						<li><input type="text"></li>
						<li><label>Email:</label></li>
						<li><input type="text"></li>
						<li><button type="submit" class="btn">Submit</button></li>
	         			</ul>
					</fieldset>
	         	</form>
	        </div>
	        <div class="span4">
	          	<h4>Reach Us</h4>
				<p><i class="icon-envelope"></i> <a href="mailto:<EMAIL>"><EMAIL></a></p>
	        </div>		
		</div>
		<!-- / row-fluid -->
	</div>
	<!-- /container -->
  </div>
  <!-- subfooter -->

<div class="footer">
	<div class="container">
			<p class="pull-left">&copy; <?php echo date('Y'); ?> Copyright <?php bloginfo('name'); ?></p>
			<p class="pull-right">
				<a href="#">Facebook</a> | <a href="#">Twitter</a>
			</p>
			<div class="clearfix"></div>
	</div>
</div>

<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/jquery.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap.min.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-transition.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-alert.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-modal.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-dropdown.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-scrollspy.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-tab.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-tooltip.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-popover.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-button.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-collapse.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-carousel.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/assets/js/bootstrap-typeahead.js"></script>
<script>
	$('.dropdown > a').append('<b class="caret"></b>').dropdown();
    $('.dropdown .sub-menu').addClass('dropdown-menu');
</script>
<?php wp_footer(); ?>
</body>
</html><file_sep>/index.php


 <?php get_header(); ?>

	

<!-- Example row of columns -->
<div id="contentpart">
	<div class="container">
		<div class="row-fluid">
			<div class="span8">
			<?php if (have_posts()) : ?>
								<?php while (have_posts()) : the_post(); ?>
									
									
									<div style="margin-bottom:30px" class="post">
											
											
												<?php //the_post_thumbnail(array('class' => 'alignleft')); ?>
												<div class="pull-left">
												<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
												<p class="meta">
													<span class="label label-inverse"><?php the_date(); ?> by <?php the_author() ?></span>
												</p>
												</div>
												<div class="commentBubble pull-right" style="padding-top:25px;">
													Comments <span class="badge badge-info"><a style="color:#fff; font-size:18px;" href="<?php comments_link(); ?>"><?php comments_number( '0','1','%'); ?></a></span>
												</div>
												<div class="clearfix"></div>
												<?php the_excerpt(); ?> 
												<a class="btn" href="<?php the_permalink() ?>">… Read More</a>
												


									</div> <!-- end  post-->
									<?php endwhile; ?>

									<div class="navigation">
										<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
										<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
									</div>

									<?php else : ?>

									<h2 class="center">Not Found</h2>
									<p class="center">Sorry, but you are looking for something that isn't here.</p>

							<?php endif; ?>
			</div>
			<div class="span4">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?><?php endif; ?>					
			</div>
			
	    </div> <!-- row-fluid -->
	</div> <!-- container -->
</div> <!-- contentpart -->

<?php get_footer(); ?><file_sep>/404.php


 <?php get_header(); ?>
	

<!-- Example row of columns -->
<div id="contentpart">
	<div class="container">
		<div class="row-fluid">
			<div class="span8">
				
				<p>Seems you are lost. Here let me show you way <a href="/">out.</a></p>
			
			</div>
			<div class="span4">
					<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?><?php endif; ?>								
			</div>
			
	    </div> <!-- row-fluid -->
	</div> <!-- container -->
</div> <!-- contentpart -->

<?php get_footer(); ?>