solmaz

مشکل پیوند یکتا در کروم

3 پست در این موضوع قرار دارد

سلام

من وقتی پیوند یکتا رو روی نام و نوشته میزارم فقط در فایر فاکس درست نشون میده.در کروم و ie یک سری اعداد در آدرس بار میاره و در صفحه error میاره


Warning: Cannot modify header information - headers already sent by (output started at /home/sumwin/public_html/wp-content/themes/theme18318/front-page.php:1) in /home/sumwin/public_html/wp-content/themes/theme18318/header.php on line 15

این فایل header.php:


<?php
$webSiteUrl = get_bloginfo('url')."/";
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {
$pageURL .= "s";
};
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
};
if($webSiteUrl!=$pageURL){
$pageHash = substr($pageURL, strlen($webSiteUrl), strlen($pageURL));
header("location:".$webSiteUrl."#!/".$pageHash."");
exit;
};
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" <?php language_attributes();?>> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" <?php language_attributes();?>> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" <?php language_attributes();?>> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html <?php language_attributes();?>> <!--<![endif]-->
<head>
<title><?php if ( is_category() ) {
echo __('Category Archive for "', 'theme18318'); single_cat_title(); echo __('" | ', 'theme18318'); bloginfo( 'name' );
} elseif ( is_tag() ) {
echo __('Tag Archive for "', 'theme18318'); single_tag_title(); echo __('" | ', 'theme18318'); bloginfo( 'name' );
} elseif ( is_archive() ) {
wp_title(''); echo __(' Archive | ', 'theme18318'); bloginfo( 'name' );
} elseif ( is_search() ) {
echo __('Search for "', 'theme18318').wp_specialchars($s).__('" | ', 'theme18318'); bloginfo( 'name' );
} elseif ( is_home() || is_front_page()) {
bloginfo( 'name' ); echo ' | '; bloginfo( 'description' );
} elseif ( is_404() ) {
echo __('Error 404 Not Found | ', 'theme18318'); bloginfo( 'name' );
} elseif ( is_single() ) {
wp_title('');
} else {
echo wp_title( ' | ', false, right ); bloginfo( 'name' );
} ?></title>
<meta name="description" content="<?php wp_title(); echo ' | '; bloginfo( 'description' ); ?>" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php
$useragent=strtolower($_SERVER['HTTP_USER_AGENT']);
if(strripos($useragent, "ipod")>1 || strripos($useragent, "ipad")>1 || strripos($useragent, "iphone")>1){
echo '<meta name="viewport" content="width=device-width,initial-scale=1.0">';
}else{
echo '<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">';
};
?>
<meta name="viewport" content="width=device-width,initial-scale=1.0<?php echo $userScale; ?>">
<link rel="profile" href="http://gmpg.org/xfn/11" />
<!--<link rel="icon" href="<?php bloginfo( 'template_url' ); ?>/favicon.ico" type="image/x-icon" />-->
<link rel="icon" href="http://www.sumwin.co/wp-content/uploads/2014/01/fav.png" type="image/x-icon" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'rss2_url' ); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'atom_url' ); ?>" />
<?php /* The HTML5 Shim is required for older browsers, mainly older versions IE */ ?>
<!--[if lt IE 8]>
<div style=' clear: both; text-align:center; position: relative;'>
<a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" alt="" /></a>
</div>
<![endif]-->
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/reset.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/responsive_grid.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/default_style.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/768.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/480.css" />
<?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();
?>
<!--[if lt IE 9]>
<style type="text/css">
.border{
behavior:url(<?php bloginfo('stylesheet_directory'); ?>/PIE.php);
position: relative;
}
.button{
behavior:url(<?php bloginfo('stylesheet_directory'); ?>/PIE.php);
position: relative;
}
.wp-pagenavi a{
behavior:url(<?php bloginfo('stylesheet_directory'); ?>/PIE.php);
position: relative;
}
#backToTop{
behavior:url(<?php bloginfo('stylesheet_directory'); ?>/PIE.php);
position: relative;
}
</style>
<script src="<?php bloginfo('template_url'); ?>/js/html5.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/IE8.css" />
<![endif]-->
<!-- Custom CSS -->
<?php if(of_get_option('custom_css') != ''){?>
<style type="text/css">
<?php echo of_get_option('custom_css' ) ?>
</style>
<?php }?>
<style type="text/css">
/* Body styling options */
<?php $background = of_get_option('body_background');
if ($background != '') {
if ($background['image'] != '') {
echo 'body { background-image:url('.$background['image']. '); background-repeat:'.$background['repeat'].'; background-position:'.$background['position'].'; background-attachment:'.$background['attachment'].'; }';
}
if($background['color'] != '') {
echo 'body { background-color:'.$background['color']. '}';
}
};
?>
/* Links and buttons color */
<?php
$links_styling = of_get_option('links_color');
$links_styling_hover = of_get_option('links_color_hover');
if($links_styling) {
echo 'a{color:'.$links_styling.'; -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease;}';
}else{
echo 'a{-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease;}';
}
if($links_styling) {
echo 'a:hover, a:active{color:'.$links_styling_hover.'; -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease;}';
}else{
echo 'a{-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease;}';
}
?>

/* Body typography */
<?php $body_typography = of_get_option('body_typography');
if($body_typography) {
echo 'body {font-family:'.$body_typography['face'].'; color:'.$body_typography['color'].'; font-size:'.$body_typography['size'].'; font-style:'.$body_typography['style'].';}';
}
?>
<?php echo 'body {-webkit-text-size-adjust: none;}'; ?>
</style>
<script type="text/javascript">
$(window).load(function() {
$("#galleryHolder").gallerySplash({
autoPlayState:'<?php echo of_get_option('auto_play'); ?>',
autoPlayTime:'<?php echo of_get_option('change_delay'); ?>',
alignIMG:'<?php echo of_get_option('align_img'); ?>',
controlDisplay:'<?php echo of_get_option('display_navigation'); ?>',
paginationDisplay:'<?php echo of_get_option('display_pagination'); ?>',
animationSpeed:'<?php echo of_get_option('animation_speed'); ?>'
});
});
</script>
</head>
<body <?php body_class(); ?>>
<div id="web_site_spinner"></div>
<div id="wrapper">
<div id='pageSpinner'><div></div></div>
<div id="backToTop"><div></div></div>
<div id="gall">
<?php include_once(TEMPLATEPATH . '/slider.php'); ?>
</div>
<header>
<div id='imgSpinner'></div>
<div class="container">
<h1 id="logo">
<?php if(of_get_option('logo_type') == 'text_logo'){?>
<a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>" id="logoText" class="<?php bloginfo( 'template_url' );?>"><?php bloginfo( 'name', 'display' ); ?></a>
<p id="logoSlogan"><?php bloginfo('description'); ?></p>
<?php } else { ?>
<?php if(of_get_option('logo_url') != ''){ ?>
<a href="<?php bloginfo('url'); ?>/" class="<?php bloginfo( 'template_url' );?>" id="logoImg"><img src="<?php echo of_get_option('logo_url', "" ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
<?php } else { ?>
<a href="<?php bloginfo('url'); ?>/" class="<?php bloginfo( 'template_url' );?>" id="logoImg"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
<?php } ?>
<?php }?>
</h1>
<nav id="menuWrapper" class="menu-footer-menu-container">
<?php /*wp_nav_menu( array(
'menu_id' => 'headerMenu',
'menu_class' => 'menu',
'container' => 'nav',
'container_id' => 'menuWrapper',
'depth' => 0,
'theme_location' => 'footer_menu'
));*/
?>
</nav>
<?php
if ( ! is_404() ){
echo ('<div id="header-sidebar">');
dynamic_sidebar( 'Header' );
echo ('</div>');
}
?>
</div>
</header>

و این فایل front-page.php


<?php get_header(); ?>
<div id='pageList'>
<section class="container">
<article id='pageHolder_1'>
</article>
<article id='pageHolder_2'>
</article>
</section>
</div>
<?php get_footer(); ?>

میشه راهنمایی کنید؟

0

به اشتراک گذاری این پست


لینک به پست

خطا را در انجمن جستجو کنید: Cannot modify header information

1

به اشتراک گذاری این پست


لینک به پست

بایگانی شد

0

به اشتراک گذاری این پست


لینک به پست
مهمان
این موضوع برای عدم ارسال قفل گردیده است.