<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<script type="text/javascript" src="<? echo get_bloginfo('template_directory').'/js/jquery.js';?>"></script>
<script type="text/javascript" src="<? echo get_bloginfo('template_directory').'/js/main.js';?>"></script>
<script type="text/javascript" src="<? echo get_bloginfo('template_directory').'/js/jquery.bxSlider.js';?>"></script>
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34363212-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<meta name="msvalidate.01" content="6F40CD92E66FE4E4B2EB4694463E7F28" />
<meta name="google-site-verification" content="aBuH35LZaGUuVhqBoOhmXpWMjXjPBYEnRLK6IwoXKQM" />
</head>
<body <?php body_class(); ?>>
<?php //echo "<pre>"; print_r($post)?>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="masthead">
<div id="branding" role="banner">
<div class="tel_main">
<div class="logo_new"> <a href="http://www.marshalls.co.uk" target="_blank"> <img style="margin-top:10px;" width="90" src="<? echo get_bloginfo('template_directory').'/images/marshalls_logo_hires.png'; ?>" alt="" /></a>
<a href="http://www.marshalls.co.uk" target="_blank"> <img style="margin-top:10px;" width="90" src="<? echo get_bloginfo('template_directory').'http://www.selandscapeconstruction.co.uk/wp-content/uploads/2012/11/CityGuildsLogo.jpg'; ?>" alt="" /></a>
</div>
<div class="request_a_free_quote"><a href=" <?php echo $permalink = get_permalink(166); ?>">GET A FREE QUOTE</a></div>
<div class="request_border"> </div>
<div class="tel"><h3><?php echo get_option( 'v_phone' );?></h3></div>
</div>
<div class="logo_new_menu"><a href="<?php echo get_option('home');?>"><img src="<? echo get_bloginfo('template_directory').'/images/landscapingmenu.png'; ?>" alt="" /></a></div>
<?php
$args = array('sort_column' => 'menu_order');
$menupages = get_pages($args);
$args = array(
'sort_column' => 'menu_order',
'numberposts' => 100,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'services',
'parent' => 0,
'hierarchical' => true,
'post_status' => 'publish' );
$services_posts=get_pages( $args );
$args = array(
'sort_column' => 'menu_order',
'order' => 'ASC',
'post_type' => 'slider',
'post_status' => 'publish' );
$slider_posts=get_posts( $args ); ?>
<div class="navbar">
<ul>
<li><a <?php if( is_home() ) { echo "class='active'"; }?> href="<?php echo get_option('home');?>">Home</a></li>
<?php foreach($menupages as $menupage) { ?>
<li><a <?php if(($menupage->ID==$post->ID) || ($menupage->ID == 158 && $post->post_type=='services')) echo "class='active'";?> href="<?php echo get_permalink($menupage->ID); ?>"><?php echo $menupage->post_title; ?></a>
<?php if($menupage->ID == 158 || $menupage->post_title == 'Landscaping Services') {
echo '<ul>';
foreach ($services_posts as $service_data) {
$args = array(
'sort_column' => 'menu_order',
'numberposts' => 100,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'services',
'parent' => $service_data->ID,
'hierarchical' => true,
'child_of' => $service_data->ID,
'post_status' => 'publish' );
$child_posts=get_pages( $args );
$permalink = get_permalink($service_data->ID);
echo '<li class="submenu_parent"><a href=';
if(!empty($child_posts))
echo get_permalink($child_posts[0]->ID);
else
echo get_permalink($service_data->ID);
echo '>'.$service_data->post_title."</a>";
if(!empty($child_posts)) {
echo '<ul>';
foreach ($child_posts as $child_post) {
$permalink = get_permalink($child_post->ID);
echo '<li style="width: 230px;"><a href='.get_permalink($child_post->ID).'>'.$child_post->post_title."</a></li>";
}
echo '</ul>';
}
echo '</li>';
}
echo '</ul>';
} ?>
</li>
<?php } ?>
</ul>
</div>
<?php if (is_home()) { ?>
<div class="slider_area">
<div class="slider_inner">
<ul id="slider">
<?php
foreach($slider_posts as $slider_post) {
$url = wp_get_attachment_url( get_post_thumbnail_id($slider_post->ID) ); ?>
<li><img src="<?php echo $url;?>" width="1020" height="517" alt="<?php echo $slider_post->post_title; ?>" title="<?php echo $slider_post->post_content; ?>" /></li>
<?php
}?>
</ul>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<div id="main">