Hallo zusammen
Ich habe im Header einen PHP-Code, welcher 2 Dinge aus der Datenbank ausgeben soll. Das funktioniert auch wunderschön, alles gut. Doch wenn ich diesen Code im Header habe wird mein Menü, welches mit wp_list_pages ausgegeben wird nicht mehr dargestellt. Zudem wird mein Headerbild auch nicht mehr ausgegeben. Hat jemand eine Idee, woran das liegt?
Hier der Code meiner header.php
PHP
<!DOCTYPE html>
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
<title><?php wp_title(' - ', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" >
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" >
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" >
<script src="<?php bloginfo('template_url'); ?>/js/toggle.js" type="text/javascript"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20886618-3']);
_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> <!--Google Analytics-->
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo"><a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/labhart-logo.png" alt="" /></a></div><!--logo-->
<div id="goldjahr"></div><!--goldjahr-->
<div id="auktion" style="background-color:none; width:200px; height:60px; float:right; margin-top:5px;">
<?php
$get_connection = mysql_connect("server", "user", "password");
mysql_select_db("database", $get_connection);
$auktionen = mysql_query("SELECT * FROM angebot WHERE angebot_gueltigkeit=1 LIMIT 1");
$get_auktionen = mysql_fetch_array($auktionen);
echo '
Aktuelle Auktion: <br/>
<b style="font-size:15px;">' . $get_auktionen['auktion_titel'] . '</b><br/>
Aktueller Preis: <br/>
<b style="font-size:15px;">' . $get_auktionen['auktion_preis_aktuell'] . '</b>';
?>
</div><!--auktionsbanner-->
<div id="quicklinks">
<ul>
<li><a href="<?php bloginfo('url')?>/?page_id=134">Kontakt</a></li>
<li><a href="<?php bloginfo('url')?>/?page_id=132">Spieldosen</a></li>
<li><a href="<?php bloginfo('url')?>/?page_id=130">Aktuell</a></li>
<li><a href="<?php bloginfo('url')?>/?page_id=2146">Auktion</a></li>
<li><a href="<?php bloginfo('url')?>/?page_id=126">Angebote</a></li>
<li><a href="<?php bloginfo('url')?>/?page_id=118">Impressum</a></li>
</ul>
</div><!--quicklinks-->
</div><!-- header -->
<div id="menu_bild">
<?php
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'full' );
else : ?>
<img src="<?php bloginfo('template_url'); ?>/images/header-home.png" />
<?php endif; ?>
</div><!--menu_bild-->
Alles anzeigen
Liebe Grüsse