Skip to content

Instantly share code, notes, and snippets.

@laranz
Created October 31, 2015 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laranz/02916cd95c86babcf2c4 to your computer and use it in GitHub Desktop.
Save laranz/02916cd95c86babcf2c4 to your computer and use it in GitHub Desktop.
Header.php
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head> <meta charset="<?php bloginfo('charset'); ?>" />
<!-- Mobile Specific Metas--> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>
<?php wp_title(' '); ?>
<?php if(wp_title(' ', false)) { echo '|'; } ?>
<?php bloginfo('name'); ?>
</title>
<meta name="keywords" content="<?php echo get_option('metakey'); ?>"/>
<?php if (is_single()) { ?>
<meta property="og:title" content="<?php single_post_title(''); ?>" />
<meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
<meta property="og:type" content="<?php the_excerpt(); ?>" />
<?php $fullImageSrc = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>
<meta property="og:image" content="<?php echo $fullImageSrc[0] ?>" />
<?php } else { } ?>
<?php if(get_option('rtlok1') == "yes") { ?>
<?php } ?><?php if(get_option('rtlok1') == "no") { ?> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/rtl.css" type="text/css" /><?php } ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen"/>
<link rel="shortcut icon" href="<?php echo get_option('favicon'); ?>"/>
<link rel="shortcut icon" href="<?php echo get_option('favicon'); ?>" type="image/x-icon"/>
<meta name="generator" content="Magazine3 Framework" />
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<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'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php if ( is_single()){ ?> <style>#content .post { border: none !important;} </style> <?php } ?>
<style media="screen" type="text/css"> .custom1{border-top:3px solid <?php echo of_get_option('example_colorpicker', '#000' ); ?> !important;} .custom1 a{color:<?php echo of_get_option('example_colorpicker', '#000' ); ?> !important;} .custom2{border-top:3px solid <?php echo of_get_option('block2color', '#000' ); ?> !important;} .custom2 a{color:<?php echo of_get_option('block2color', '#000' ); ?> !important} .custom3{border-top:3px solid <?php echo of_get_option('block3color', '#000' ); ?> !important;} .custom3 a{color:<?php echo of_get_option('block3color', '#000' ); ?> !important} .custom4{border-top:3px solid <?php echo of_get_option('block4color', '#000' ); ?> !important;} .custom4 a{color:<?php echo of_get_option('block4color', '#000' ); ?> !important} .custom5{border-top:3px solid <?php echo of_get_option('block5color', '#000' ); ?> !important;} .custom5 a{color:<?php echo of_get_option('block5color', '#000' ); ?> !important} .custom6{border-top:3px solid <?php echo of_get_option('block6color', '#000' ); ?> !important;} .custom6 a{color:<?php echo of_get_option('block6color', '#000' ); ?> !important} .custom7{border-top:3px solid <?php echo of_get_option('block7color', '#000' ); ?> !important;} .custom7 a{color:<?php echo of_get_option('block7color', '#000' ); ?> !important}
.custom8{border-top:3px solid <?php echo of_get_option('block8color', '#000' ); ?> !important;} .custom8 a{color:<?php echo of_get_option('block8color', '#000' ); ?> !important} .custom9{border-top:3px solid <?php echo of_get_option('block9color', '#000' ); ?> !important;} .custom9 a{color:<?php echo of_get_option('block9color', '#000' ); ?> !important} .custom10{border-top:3px solid <?php echo of_get_option('block10color', '#000' ); ?> !important;} .custom10 a{color:<?php echo of_get_option('block10color', '#000' ); ?> !important} .custom11{border-top:3px solid <?php echo of_get_option('block11color', '#000' ); ?> !important;} .custom11 a{color:<?php echo of_get_option('block11color', '#000' ); ?> !important} .custom12{border-top:3px solid <?php echo of_get_option('block12color', '#000' ); ?> !important;} .custom12 a{color:<?php echo of_get_option('block12color', '#000' ); ?> !important} </style>
<?php echo get_option('hscript'); ?>
<?php if ( is_singular() ) { ?><link rel="canonical" href="<?php the_permalink(); ?>" /><?php } ?>
<?php if(get_option('whitenavok')!="yes"):?><style>#header{height: auto;}</style><?php endif?>
<?php if(get_option('whitenavok')!="no"):?><?php endif?>
<?php if(get_option('blacknavok')!="yes"):?><style>#header{height: auto;}</style><?php endif?>
<?php if(get_option('blacknavok')!="no"):?><?php endif?>
<?php wp_head(); ?>
<?php if(get_option('handheldok') == "yes") { ?>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/handheld.css" type="text/css" />
<?php } ?>
<?php if(get_option('handheldok') == "no") { ?> <?php } ?>
</head> <body <?php body_class(); ?>><div class="top1"><a id="top"></a></div>
<div id="wrapper">
<?php if(get_option('ad9ok')!="yes"):?><?php endif?>
<?php if(get_option('ad9ok')!="no"):?> <div class="ad9"><?php echo get_option('ad9'); ?></div> <?php endif?>
<div id="header">
<div id="topheaderbar">
<div id="topheaderbar-l">
<div id="topnavigation">
<?php if(get_option('editionok')!="no"):?><div id="edition">Edition: <?php echo get_option('edition'); ?> | </div><?php endif?><?php if(get_option('editionok')!="yes"):?><?php endif?>
<div id="nav"><div id="menu"><ul><?php wp_nav_menu( array( 'walker' => new Arrow_Walker_Nav_Menu, 'theme_location' => 'main-menu', 'container_class' => 'menu-header', 'fallback_cb'=>'primarymenu2') );?></ul></div></div>
</div>
</div><div class="cart-show"><?php if ( class_exists( 'WooCommerce' ) ) { global $woocommerce; ?>
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a>
<?php } else {}?></div>
<div id="topheaderbar-r"><?php echo date_i18n('l d F, Y'); ?></div>
<div class="cb"></div>
</div>
<div id="header2">
<div id="logoleft"><a href="<?php echo get_option('home'); ?>"><img src="<?php echo get_option('logo'); ?>" alt="<?php echo get_option('logoalt'); ?>" /></a></div>
<?php if(get_option('headerformatok')!="no"):?>
<div id="logoright">
<div id="logoright-left">
<div id="logoright-left-cat">
<div id="logoright-left-cat-wrapper">
<div id="logoright-left-cat-wrapper-title"><?php echo get_option('breakingtxt'); ?></div>
<?php $otherFeaturedPost = new WP_Query();$otherFeaturedPost->query('showposts=1&cat='.get_option('breakingcat').'&offset=0'); ?>
<?php while ($otherFeaturedPost->have_posts()) : $otherFeaturedPost->the_post(); ?>
<div id="logoright-left-cat-wrapper-left">
<?php if(get_option('thumbok')!="no"):?> <?php if( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('singlegalthumb'); ?></a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>"> <img src="<?php bloginfo('template_directory'); ?>/images/noimg.png" style="width:55px; height:45px;" /> </a><?php } ?>
<?php endif?>
<?php if(get_option('thumbok')!="yes"):?>
<?php $m_scrp = get_template_directory_uri() . '/includes/timthumb.php?';
$m_image = '';
$customfields = get_post_custom(); if (empty($customfields['image'][0])) {
$m_image = m_theme_capture_first_image(); } else { $m_image = $customfields['image'][0]; } if (empty($m_image)) { $imgpath = $m_image_def; } else {
$imgpath = $m_scrp . 'src=' . $m_image . '&amp;w=' . 55 . '&amp;h=' . 45 . '&amp;zc=1'; } ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<img src="<?php echo $imgpath; ?>" alt="" /> </a>
<?php endif?>
</div>
<div id="logoright-left-cat-wrapper-right"><div id="logoright-left-cat-wrapper-right-cattitle"><?php the_category(', ') ?></div><h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php short_title('','...',true, '49'); ?></a></h2></div>
<?php $c++; endwhile; wp_reset_query(); ?>
<div class="cb"></div>
</div>
</div>
</div>
<div id="logoright-right">
<img src="http://www.sabadografico.net/wp-content/uploads/2015/10/SG.Port561006-6-copia2.jpg" width="200px" height="200px"/>
</div>
<div class="cb"></div>
</div>
<?php endif?>
<?php if(get_option('headerformatok')!="yes"):?>
<div id="logoright" style="width:auto !important">
<?php echo get_option('headerad'); ?>
</div>
<?php endif?>
<div class="cb"></div>
</div>
<div id="header3">
<div id="header3-1">
<div id="header3-1-left">
<div id="header3-1-left-tickerimg"><img src="<?php bloginfo('template_directory'); ?>/images/headlines.png" alt="Headlines" /></div>
<div id="header3-1-left-ticker">
<ul id="once">
<?php magazine3_ticker(); ?>
</ul>
</div>
<div class="cb"></div>
</div>
<div id="header3-1-right">
<ul>
<li style="margin-left: 2px;"><a href="<?php echo get_option('feedlink'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/rss.png" /></a></li>
<li style="margin-left: 8px;"><a href="<?php echo get_option('feedemail'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/email.png" /></a></li>
<?php if(get_option('diggok')!="yes"):?><?php endif?> <?php if(get_option('diggok')!="no"):?><li><a href="<?php echo get_option('digg'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/digg.png" /></a></li><?php endif?>
<?php if(get_option('fbok')!="yes"):?><?php endif?> <?php if(get_option('fbok')!="no"):?><li><a href="<?php echo get_option('fb'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/facebook.png" /></a> </li><?php endif?>
<?php if(get_option('gpok')!="yes"):?><?php endif?> <?php if(get_option('gpok')!="no"):?><li><a href="<?php echo get_option('gp'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/google_plus.png" /></a> </li><?php endif?>
<?php if(get_option('instagramok')!="yes"):?><?php endif?> <?php if(get_option('instagramok')!="no"):?><li><a href="<?php echo get_option('instagram'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/instagram.png" /></a> </li><?php endif?>
<?php if(get_option('flickrok')!="yes"):?><?php endif?> <?php if(get_option('flickrok')!="no"):?><li><a href="<?php echo get_option('flickr'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/flickr.png" /></a> </li><?php endif?>
<?php if(get_option('gowallaok')!="yes"):?><?php endif?> <?php if(get_option('gowallaok')!="no"):?><li><a href="<?php echo get_option('gowalla'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/gowalla.png" /></a> </li><?php endif?>
<?php if(get_option('lastfmok')!="yes"):?><?php endif?> <?php if(get_option('lastfmok')!="no"):?><li><a href="<?php echo get_option('lastfm'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/lastfm.png" /></a> </li><?php endif?>
<?php if(get_option('linkedinok')!="yes"):?><?php endif?> <?php if(get_option('linkedinok')!="no"):?><li><a href="<?php echo get_option('linkedin'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/linkedin.png" /></a> </li><?php endif?>
<?php if(get_option('redditok')!="yes"):?><?php endif?> <?php if(get_option('redditok')!="no"):?><li><a href="<?php echo get_option('reddit'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/reddit.png" /></a> </li><?php endif?>
<?php if(get_option('youtubeok')!="yes"):?><?php endif?> <?php if(get_option('youtubeok')!="no"):?><li><a href="<?php echo get_option('youtube'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/youtube.png" /></a> </li><?php endif?>
<?php if(get_option('twitterok')!="yes"):?><?php endif?> <?php if(get_option('twitterok')!="no"):?><li><a href="<?php echo get_option('twitter'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/twitter.png" /></a> </li><?php endif?>
<?php if(get_option('daok')!="yes"):?><?php endif?> <?php if(get_option('daok')!="no"):?><li><a href="<?php echo get_option('da'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/deviantart.png" /></a> </li><?php endif?>
<?php if(get_option('stumbleuponok')!="yes"):?><?php endif?> <?php if(get_option('stumbleuponok')!="no"):?><li><a href="<?php echo get_option('stumbleupon'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/stumbleupon.png" /></a> </li><?php endif?>
<?php if(get_option('skypeok')!="yes"):?><?php endif?> <?php if(get_option('skypeok')!="no"):?><li><a href="<?php echo get_option('skype'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/skype.png" /></a> </li><?php endif?>
<?php if(get_option('myspaceok')!="yes"):?><?php endif?> <?php if(get_option('myspaceok')!="no"):?><li><a href="<?php echo get_option('myspace'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/myspace.png" /></a> </li><?php endif?>
<?php if(get_option('buzzok')!="yes"):?><?php endif?> <?php if(get_option('buzzok')!="no"):?><li><a href="<?php echo get_option('buzz'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/buzz.png" /></a> </li><?php endif?>
<?php if(get_option('fsok')!="yes"):?><?php endif?> <?php if(get_option('fsok')!="no"):?><li><a href="<?php echo get_option('fs'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/foursquare.png" /></a> </li><?php endif?>
<?php if(get_option('bebook')!="yes"):?><?php endif?> <?php if(get_option('bebook')!="no"):?><li><a href="<?php echo get_option('bebo'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/bebo.png" /></a> </li><?php endif?>
<?php if(get_option('postok')!="yes"):?><?php endif?> <?php if(get_option('postok')!="no"):?><li><a href="<?php echo get_option('post'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/posterous.png" /></a> </li><?php endif?>
<?php if(get_option('yelpok')!="yes"):?><?php endif?> <?php if(get_option('yelpok')!="no"):?><li><a href="<?php echo get_option('yelp'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/yelp.png" /></a> </li><?php endif?>
<?php if(get_option('spotifyok')!="yes"):?><?php endif?> <?php if(get_option('spotifyok')!="no"):?><li><a href="<?php echo get_option('spotify'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/spotify.png" /></a> </li><?php endif?>
</ul>
</div>
<div class="cb"></div>
</div>
<div id="header3-2">
<?php if(get_option('blacknavok')!="yes"):?><?php endif?>
<?php if(get_option('blacknavok')!="no"):?>
<div id="menu2"><ul><?php wp_nav_menu( array( 'walker' => new Arrow_Walker_Nav_Menu, 'theme_location' => 'second', 'container_class' => 'menu-header', 'fallback_cb'=>'primarymenu2') );?></ul></div>
<?php endif?>
<?php if(get_option('whitenavok')!="yes"):?><?php endif?>
<?php if(get_option('whitenavok')!="no"):?>
<div id="menu3"><ul>
<li id="current-home-nav" style="float:left"><a href="<?php echo get_option('home'); ?>"><?php _e("Home", "nt"); ?></a></li>
<?php wp_nav_menu( array( 'walker' => new Arrow_Walker_Nav_Menu, 'theme_location' => 'fourth', 'container_class' => 'menu-header', 'fallback_cb'=>'primarymenu4') );?></ul></div>
<?php endif?>
</div>
<nav id="mobile-menu" role="navigation"></nav>
<div class="cb"></div>
</div>
</div>
<div id="section">
<?php if(get_option('ad10ok')!="yes"):?><?php endif?>
<?php if(get_option('ad10ok')!="no"):?><div class="hidead"><center style="margin-top: 2px;margin-bottom: 2px;"><?php echo get_option('ad10'); ?></center></div><?php endif?>
<div id="column-wrap">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment