Hallo,
ich habe folgendes Problem und komme nicht dahinter.
Ich habe eine Subnavigation eingebaut, die auch reibungslos funktioniert, bis darauf, dass Sie immer wieder verschwindet nachdem ich einen Link darin angeklickt hab. Diese soll jedoch bestehen bleiben.
PHP
<div id="subnavigation">
<?php if (category_has_children() && !is_home() && !is_search() && !is_page()) { ?>
<ul>
<?php if (!empty($parentcat)) { ?>
<?php if (wp_list_categories('orderby=order&title_li=&depth=1&echo=0&child_of='.$parentcat)) { ?>
<?php wp_list_categories('orderby=order&title_li=&depth=1&child_of='.$parentcat); ?>
<?php } ?>
<?php } else { ?>
<?php if (wp_list_categories('orderby=order&title_li=&depth=1&echo=0&child_of='.$currentcat)) { ?>
<?php wp_list_categories('orderby=order&title_li=&depth=1&child_of='.$currentcat); ?>
<?php } ?>
<?php } ?>
</ul>
<div class="clear"></div>
Alles anzeigen
Hier nochmal die Komplette Header.php
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<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="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.ico" type="image/x-icon" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 | <?php bloginfo('name'); ?>" href="<?php echo get_bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS 0.92 | <?php bloginfo('name'); ?>" href="<?php echo get_bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3 | <?php bloginfo('name'); ?>" href="<?php echo get_bloginfo('atom_url'); ?>" />
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper">
<div id="header">
<div class="logo">
<a href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" width="200" height="97" border="0" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" /></a>
</div>
<div id="navigation">
<ul>
<?php
$category = get_the_category();
$currentcat = getCurrentCatID();
$parentcat = getCategory($currentcat);
if (empty($parentcat) && !is_home() && !is_search()) {
$parentcat = $category[0]->category_parent;
}
if (empty($currentcat) && is_single() && !is_search()) {
$currentcat = $category[0]->term_id;
}
?>
<?php if (!empty($parentcat)) { ?>
<?php wp_list_categories('orderby=order&title_li=&depth=1¤t_category='.$parentcat); ?>
<?php } else { ?>
<?php wp_list_categories('orderby=order&title_li=&depth=1¤t_category='.$currentcat); ?>
<?php } ?>
<?php wp_list_pages('title_li=&depth=&exclude=57,63,59'); ?> </ul>
<div class="clear"></div>
</div>
<div id="subnavigation">
<?php if (category_has_children() && !is_home() && !is_search() && !is_page()) { ?>
<ul>
<?php if (!empty($parentcat)) { ?>
<?php if (wp_list_categories('orderby=order&title_li=&depth=1&echo=0&child_of='.$parentcat)) { ?>
<?php wp_list_categories('orderby=order&title_li=&depth=1&child_of='.$parentcat); ?>
<?php } ?>
<?php } else { ?>
<?php if (wp_list_categories('orderby=order&title_li=&depth=1&echo=0&child_of='.$currentcat)) { ?>
<?php wp_list_categories('orderby=order&title_li=&depth=1&child_of='.$currentcat); ?>
<?php } ?>
<?php } ?>
</ul>
<div class="clear"></div>
<?php } ?>
</div>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</div>
<?php if (function_exists('randomheader')) { randomheader(); } ?>
Alles anzeigen
Hab gerade ein Brett vorm Kopf. :oops: