Sure thing, thanks for the assist. Here’s header.php below. The theme is Black Label
About the logging out issue – it does not seem theme related as I have tried again with a fresh wp install and default themes and same problem. I’m wondering if it’s a MAMP related thing. I will try publishing the site to a live host and see if the logout issue is resolved. I have not had this happen on live sites in the past.
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7 ]> <html class="ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8 ]> <html class="ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<?php if (is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<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', 'eneaa' ), max( $paged, $page ) );
?>
</title>
<meta name="description" content="<?php bloginfo('description'); ?>">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<!-- 960Grid -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/960.css" />
<!-- Dropdown Menu & Shortcodes Styles -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/shortcodes_and_menu.css" />
<!-- Tabs -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/tabs.css" />
<?php
$global_style = get_option('of_global_style');
if($global_style == 'Light'){
?>
<!-- General Styles Light -->
<link class="css_light" rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/light_skin.css" />
<?php
}else{
?>
<!-- General Styles Dark -->
<link class="css_dark" rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<?php
}
?>
<!-- Preloader -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/preloader.css" />
<!-- prettyPhoto -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/prettyPhoto.css" />
<!-- html5shiv -->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script>window.jQuery || document.write(unescape('%3Cscript src="<?php echo get_template_directory_uri(); ?>/js/jquery-1.5.2.min.js"%3E%3C/script%3E'))</script>
-->
<!-- WP_Head -->
<?php wp_head(); ?>
<!-- /WP_Head -->
<!-- SWF Object -->
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/swfobject.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.jplayer.min.js"></script>
<?php $map_key = get_option('of_gmaps_key');
if($map_key){
?>
<!-- Google Maps -->
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=<?php echo get_option('of_gmaps_key'); ?>"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.gmap-1.1.0-min.js"></script>
<?php } ?>
<!-- Scripts from Admin Panel & Portfolios -->
<?php include (TEMPLATEPATH . '/framework/theme_scripts/scripts.php' ); ?>
<!-- adds the comment-reply JavaScript to the single post pages -->
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<!-- Facebook Tags -->
<?php
if(is_single()){
if (have_posts()) :
while (have_posts()) : the_post();
$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
endwhile;
endif;
$facebook_id = get_option('of_facebook_id');
?>
<meta property="og:title" content="<?php wp_title("",true); ?>" />
<meta property="og:type" content="product" />
<meta property="og:url" content="<?php the_permalink(); ?>" />
<meta property="og:image" content="<?php echo $thumbnail[0]; ?>" />
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
<meta property="fb:admins" content="<?php echo $facebook_id; ?>" />
<?php } ?>
</head>
<body <?php body_class(); ?>>
<div id="wrap">
<div id="container" class="<?php if (!is_page_template('home-page.php')) {echo "inner_page"; } ?> container_12">
<header id="header" class="grid_12">
<h1><a href="<?php echo home_url(); ?>/"><?php if($logo = get_option('of_logo')){ ?><img src="<?php echo $logo; ?>" alt="<?php bloginfo('name'); ?>" /><?php }else{ bloginfo('name');}?></a></h1>
<nav id="nav" class="jqueryslidemenu">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'container' => false
));
?>
<div class="clear"></div>
</nav>
<div class="clear"></div>
</header>
<?php
//Get the page ID even if is the Blog Page
global $wp_query;
$page_id = $wp_query->get_queried_object_id();
$background_image = get_post_meta($page_id, 'mb_background_image', true);
$src = wp_get_attachment_image_src($background_image, 'full');
//Audio---------------------------------
$background_audio = get_post_meta($page_id, 'mb_background_audio', true);
$background_audio_format = get_post_meta($page_id, 'mb_background_audio_format', true);
if (is_page_template('home-page-youtube.php')) {//REMOVE
$background_video = "http://www.youtube.com/watch?v=aXLDyVp0rVg";//REMOVE
}elseif(is_page_template('home-page-vimeo.php')){//REMOVE
$background_video = "http://vimeo.com/25968181";//REMOVE
}else{//REMOVE
$background_video = get_post_meta($page_id, 'mb_background_video', true);//KEEP
}//REMOVE
if($background_video != "" AND !is_page_template('home-page-slider.php')){
$video_autostart = get_option('of_video_autostart');
$video_controlbar = get_option('of_video_controlbar');
$video_stretching = get_option('of_video_stretching');
$video_bufferlength = get_option('of_video_bufferlength');
$video_repeat = get_option('of_video_repeat');
?>
<?php
//If is a Vimeo Video----------------------------------------------
if (preg_match("/vimeo/i", $background_video)) {
//Get the path of the URL
$vimeo_video = parse_url($background_video, PHP_URL_PATH);
//Remove "/" if is in the URL at the end or beggining
$vimeo_video = trim($vimeo_video, "/");
?>
<div id="video_bck">
<iframe id="video" src="http://player.vimeo.com/video/<?php echo $vimeo_video; ?>?title=0&byline=0&portrait=0&autoplay=<?php if($video_autostart == 'false'){ echo 0;}else{echo 1;} ?>&loop=<?php if($video_repeat == 'none'){ echo 0;}else{echo 1;} ?>" width="400" height="170" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
</div>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function($) {
var w_height = $(window).height();
var w_width = $(window).width();
var $vimeo_video = $("#video");
$vimeo_video.width(w_width);
$vimeo_video.height(w_height);
$("#navigation").hide();
});
//]]>
</script>
<?php
} else {//If not Vimeo---------------------------------------------
?>
<div id="video_bck">
<div id="video"></div>
<script type="text/javascript">
jQuery(document).ready(function($) {
var w_height = $(window).height();
var w_width = $(window).width();
$("#navigation").hide();
jwplayer("video").setup({
flashplayer: "<?php echo get_template_directory_uri(); ?>/jwplayer/player.swf",
file: "<?php echo $background_video; ?>",
controlbar: '<?php if($video_controlbar == "true"){echo 'over';}else{echo 'none';}?>',
stretching: "<?php echo $video_stretching; ?>",
<?php
if($global_style == 'Light'){
?>
skin: "<?php echo get_template_directory_uri(); ?>/css/simple.zip",
<?php
}else{
?>
skin: "<?php echo get_template_directory_uri(); ?>/css/glow.zip",
<?php
}
?>
/*
youtube: [
{ quality: "medium"}
],
*/
autostart: <?php echo $video_autostart; ?>,
bufferlength: <?php echo $video_bufferlength; ?>,
repeat: "<?php echo $video_repeat; ?>",
<?php if (is_page_template('home-page-html5.php')) {//REMOVE ?>
modes: [
{ type: "html5"
},
{ type: "flash",
src: "<?php echo get_template_directory_uri(); ?>/jwplayer/player.swf"
},
{ type: "download" }
],
<?php } ?>
events: { onComplete: function() {
<?php if($video_repeat == "none"){ ?>
jwplayer("video").remove();
$("#video_bck").remove();
$("#navigation").show();
<?php } ?>
<?php if($background_audio != ""){?>
$("#jquery_jplayer_1").show();
$("#jp_interface_1").show();
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
<?php echo $background_audio_format; ?>: "<?php echo $background_audio; ?>"
}).jPlayer("play");
},
ended: function (event) {
$(this).jPlayer("play");
},
//solution: "flash, html", // Flash with an HTML5 fallback.
swfPath: "<?php echo get_template_directory_uri(); ?>/js/",
supplied: "<?php echo $background_audio_format; ?>"
});
<?php }//End if Audio ?>
} },
height: w_height,
width: w_width });
});
</script>
</div><!-- /video_bck -->
<?php
}//If not Vimeo
?>
<?php }else{
//Audio Player-----------------------------------------------------------------------------------
if($background_audio != ""){
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
$("#jquery_jplayer_1").show();
$("#jp_interface_1").show();
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
<?php echo $background_audio_format; ?>: "<?php echo $background_audio; ?>"
}).jPlayer("play");
},
ended: function (event) {
$(this).jPlayer("play");
},
//solution: "flash, html", // Flash with an HTML5 fallback.
swfPath: "<?php echo get_template_directory_uri(); ?>/js/",
supplied: "<?php echo $background_audio_format; ?>"
});
});
</script>
<?php } //End if Audio
//Audio Player-----------------------------------------------------------------------------------
}//Else Video
if(!is_page_template('gallery-fullscreen.php')){
$slider_autoplay = get_option('of_slider_autoplay');
$slider_slide_interval = get_option('of_slider_slide_interval');
$slider_speed_transition = get_option('of_slider_speed_transition');
$slider_transition = get_option('of_slider_transition');
$slider_pausehover = get_option('of_slider_pausehover');
$slider_navigation = get_option('of_slider_navigation');
$slider_verticalcenter = get_option('of_slider_verticalcenter');
$slider_horizontalcenter = get_option('of_slider_horizontalcenter');
?>
<!-- Supersized -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/supersized.css" />
<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery(function($){
$.supersized({
//Functionality
slideshow : 1, //Slideshow on/off
autoplay : <?php echo $slider_autoplay; ?>, //Slideshow starts playing automatically
start_slide : 1, //Start slide (0 is random)
random : 0, //Randomize slide order (Ignores start slide)
slide_interval : <?php echo $slider_slide_interval; ?>, //Length between transitions
transition : <?php echo $slider_transition; ?>, //0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
transition_speed : <?php echo $slider_speed_transition; ?>, //Speed of transition
new_window : 0, //Image links open in new window/tab
pause_hover : <?php echo $slider_pausehover; ?>, //Pause slideshow on hover
keyboard_nav : 1, //Keyboard navigation on/off
performance : 1, //0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
image_protect : 1, //Disables image dragging and right click with Javascript
image_path : '<?php echo get_template_directory_uri(); ?>/images/', //Default image path
//Size & Position
min_width : 0, //Min width allowed (in pixels)
min_height : 0, //Min height allowed (in pixels)
vertical_center : <?php echo $slider_verticalcenter; ?>, //Vertically center background
horizontal_center : <?php echo $slider_horizontalcenter; ?>, //Horizontally center background
fit_portrait : 1, //Portrait images will not exceed browser height
fit_landscape : 0, //Landscape images will not exceed browser width
//Components
navigation : <?php echo $slider_navigation; ?>, //Slideshow controls on/off
thumbnail_navigation : 0, //Thumbnail navigation
slide_counter : 0, //Display slide numbers
slide_captions : 0, //Slide caption (Pull from "title" in slides array)
slides : [ //Background image
<?php if($background_image != ""){ ?>
{ image : '<?php echo $src[0]; ?>' }
<?php }else{
//Last to First
//query_posts(array('post_type'=>'slides'));
//First to Last
query_posts('post_type=slides&order=ASC&posts_per_page=-1');
$output = "";
$n= 0;
//Loop for Post Types Slides
if ( have_posts() ) while ( have_posts() ) : the_post();
$n++;
//Slide Image
$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
//Get the Slide meta info
$slide_link = get_post_meta(get_the_ID(), 'mb_slide_link', true);
$output.="{";
$output.="image : '". $thumbnail[0] ."'";
if($slide_link != ''){
$output.=" , url : '". $slide_link." '";
} ;
$output.="},";
endwhile;
if($n > 1){
$output = substr ($output, 0, -1);
}
echo $output;
// Reset the global $the_post as this query will have stomped on it
wp_reset_query();
?>
<?php } //else ?>
]
});
});
});
</script>
<?php
}//if not fullscreen gallery
?>
<?php if($background_image != ""){ ?>
<?php }else{ ?>
<div id="navigation" class="background_2">
<a href="#" id="prevslide"></a>
<a href="#" id="pauseplay" class=""></a>
<a href="#" id="nextslide"></a>
</div><!-- /navigation -->
<?php } ?>
<!-- Audio Player ---------------------------- -->
<div id="jquery_jplayer_1"></div>
<div id="jp_interface_1" class="background_2">
<a href="#" class="jp-play">Play</a>
<a href="#" class="jp-pause">Pause</a>
</div>
<!-- Audio Player ---------------------------- -->
-
This reply was modified 4 years, 8 months ago by RK Creative.