Hallo Community,
habe ein update auf WP 3.2.1 gemacht und seitdem funktioniert der current-page-status miener selbstgemachten navigation nicht mehr.
Hat jemand von euch so ein problem?
hier mal ein snippet wie die navi aufgebaut ist.
in den header
-------------
PHP
<style type="text/css">
/* new navi begin */
.clear_both {
clear: both;
}
#navigation {
position: absolute;
z-index: 1000;
top: 0;
left: 50%;
margin-left: -426px;
overflow: hidden;
}
#navigation li {
list-style-type: none;
}
#navigation li {
float: left;
margin-right: 35px;
display: inline-block;
}
#navigation li a {
display: block;
width: 35px;
height: 301px;
text-decoration: none;
}
/* startseite */
ul li.startseite {
background: url(navigation.png) 0 -301px no-repeat;
}
ul li.startseite:hover {
background: url(navigation.png) 0 -602px no-repeat;
}
ul #<?php echo $current; ?>.startseite {
background: url(navigation.png) 0 0 no-repeat;
}
/* folgeseite */
ul li.folgeseite {
background: url(navigation.png) -70px -301px no-repeat;
}
ul li.folgeseite:hover {
background: url(navigation.png) -70px -602px no-repeat;
}
ul #<?php echo $current; ?>.folgeseite {
background: url(navigation.png) -70px 0 no-repeat;
}
</style>
Alles anzeigen
PHP
<?php
if ( is_page('startseite') ) { $current = 'startseite'; }
elseif ( is_page('folgeseite') ) { $current = 'folgeseite'; }
?>
in den body
-------------
HTML
<ul id="navigation">
<li id="startseite" class="startseite"><a href="#"> </a></li>
<li id="folgeseite" class="folgeseite"><a href="#"> </a></li>
<div class="clear_both"></div>
</ul>
dieses Prinzip lief bisher wunderbar, nun aber leider nicht mehr. Vieleicht hat einer von euch eine Lösung.
gruß, h2waldmann