Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom eu estou com o seguinte error em meu site, quem puder me ajudar ficarei grato meu error é o seguinte. (Fatal error: Call to undefined function get_header() in C:\xampp\htdocs\Phenomenon2\index.php on line 1)
Meu index.php
> <?php get_header(); ?><!-- slider-holder START here -->
<div id="slider-holder">
<div id="slider-nav-container">
<div id="slider-nav"></div>
<img src="<?php bloginfo('template_directory'); ?>/images/slider-nav-right.png" alt="" style="float:left;" /> </div>
<div id="slider">
<?php
$slider_cat = get_option('pheno_slider_cat');
$slider_items = get_option('pheno_slider_items');
$Timthumb = get_option('pheno_timthumb');
$args=array(
'posts_per_page' => $slider_items,
'category_name' => $slider_cat,
);
query_posts($args);
?>
<?php while (have_posts()) : the_post(); ?>
<div class="slide">
<div class="inside">
<?php
$has_image = get_post_meta($post->ID, "post_image_value", $single = true);
if ($has_image != '') {
?>
<?php if ($Timthumb == true) { ?>
<img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $has_image; ?>&h=200&w=200&zc=1&q=100" alt="" class="slide-img" width="200" height="200" />
<?php } else { ?>
<img src="<?php echo $has_image; ?>" alt="" class="slide-img" width="200" height="200" />
<?php } ?>
<?php } ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<!-- slider-holder END here -->
</div>
<!-- container END here -->
</header>
<?php get_sidebar('pricing'); ?>
<!-- content START here -->
<div id="content">
<!-- container START here -->
<div class="container">
<div id="home-colums">
<!-- colum1 START here -->
<div class="colum">
<h3><?php echo stripslashes(get_option('pheno_bottom_left_title')); ?></h3>
<?php echo do_shortcode(stripslashes(get_option('pheno_bottom_left_content'))); ?>
</div>
<!-- colum1 END here -->
<!-- colum2 START here -->
<div class="colum">
<h3><?php echo stripslashes(get_option('pheno_bottom_middle_title')); ?></h3>
<?php get_sidebar('services'); ?>
</div>
<!-- colum2 END here -->
<!-- colum3 START here -->
<div class="colum no-margin">
<h3><?php echo stripslashes(get_option('pheno_bottom_right_title')); ?></h3>
<?php echo do_shortcode(stripslashes(get_option('pheno_bottom_right_content'))); ?>
</div>
<!-- colum3 END here -->
</div>
</div>
<!-- container END here -->
</div>
<!-- content END here -->
</div>
<!-- site-wrapper END here -->
<?php get_footer(); ?>
Parece com WordPress e cheira a WordPress, é WordPress :lol:
Movido
PHP :seta: WordPress (Temas)
Post o código do seu arquivo header.php
> <?phpglobal $options;
foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
?>
<!DOCTYPE html>
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<meta name="description" content="<?php bloginfo('description') ?>" />
<?php if(is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php }?>
<!-- CSS -->
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/reset.css" type="text/css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/custom.css" type="text/css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/tipsy.css" type="text/css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/superfish.css" type="text/css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/fancybox/jquery.fancybox-1.3.1.css" type="text/css" />
<!--[if IE]>
<script src="<?php bloginfo('template_directory'); ?>/js/html5.js"></script>
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/ie7.css">
<![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');?>" />
<link rel="shortcut icon" href="<?php echo get_option('pheno_favicon'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
<!-- Scripts -->
<script src="<?php bloginfo('template_directory'); ?>/js/cufon-yui.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/Harabara.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/superfish.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/css_browser_selector.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.cycle.all.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/fancybox/jquery.fancybox-1.3.1.pack.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.form.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/tipsy.js"></script>
<script>
jQuery(document).ready(function() {
jQuery('#slider').cycle({
pager: '#slider-nav',
easing: 'easeOutCubic',
timeout: <?php if ( get_option('pheno_slider_speed') != '' ) {echo get_option('pheno_slider_speed');} else { echo '4000'; } ?>,
fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
});
</script>
<?php if(get_option('pheno_custom_css') != "") { ?>
<!-- Custom CSS -->
<style type="text/css">
<?php echo get_option('pheno_custom_css'); ?>
</style>
<?php } ?>
</head>
<body <?php if ( is_front_page() ) { echo 'id="home-page"'; } else { echo 'id="sub-page"'; }; ?>>
<?php $analytics_code = get_option('pheno_google_anal');
if ( $analytics_code != "" ) { echo stripslashes($analytics_code); } ?>
<!-- site-wrapper START here -->
<div id="site-wrapper">
<!-- header START here -->
<header>
<!-- container START here -->
<div class="container">
<!-- logo START here -->
<div id="logo">
<h1>
<?php $logo = get_option('pheno_logo_path'); ?>
<a href="<?php bloginfo('url');?>" title="Home" <?php if ( $logo == "" ) { echo 'class="text"'; }?>>
<?php if ( $logo != "" ) { ?>
<img src="<?php echo get_option('pheno_logo_path'); ?>" alt="<?php bloginfo('name'); ?>" />
<?php } else { echo bloginfo('name'); } ?>
</a></h1>
</div>
<!-- logo END here -->
<?php
$Display_Login = get_option('pheno_login_display');
if ($Display_Login == true) {
?>
<div id="login-holder"> <a href="#login-box" class="sml-btn green">Login</a> </div>
<?php } ?>
<!-- navigation START here -->
<?php wp_nav_menu('sort_column=menu_order&container=ul&theme_location=header-nav&menu_class=sf-menu&container_class=sf-menu'); ?>
<!-- navigation END here -->Está bem estranho, porque não vejo erros no seu código, porem essa função <?php wp_head(); ?> tem que ser a última antes de fechar a tag </head>
<?php wp_head(); ?></head>Só a título de curiosidade, no seuarquivo wp-settings.php tem a linha:
require( ABSPATH . WPINC . '/general-template.php' );
Pergunto porque é onde a função get_header() se encontra.
Essa função verifica se o arquivo header.php existe no tema e o inclui. Se não existir, por compatibilidade, inclui um header.php "padrão"
Se a função não está definida, há a chance de esse require não estar sendo executado.
Mas também sabemos que o WordPress não vem com uma falha de tal tamanho, o que pode ter acontecido é na hora do upload não ter ido o arquivo específico.
Só pra ter certeza: o arquivo que pretende abrir está dentro da pasta de temas do WordPress?
Como o erro informa, a função get_header não está definida.
Isso parece ser um template para WordPress, se for o caso, ele não é pra ser aberto diretamente e sim chamado pelo próprio WordPress.