i habe ein menü mit drei ebenen und würde es gerne so haben, dass die dritte ebene nur angezeigt wird wenn ich auf ihren parent in der zweiten ebene klicke.
meine website: http://thelondonlife.de/
ich würde es gerne so haben, dass "level3"and "another level3" nur angezeigt werden, wenn "kontakt" aktiv ist.
kann mir bitte jemand helfen, wie ich meine functions.php ändern muss?
<?php
}
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Links'), 'widget_techdesigns01_links');
function list_subpages_techdesigns01($return = 0) {
global $wpdb, $post;
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent; }
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
if($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status = 'publish'")) {
echo'<div class="menuheader"></div><div class="menucontent"><h5 class="menunav"><span>Navigation</span></h5>
';
$html = wp_list_pages("child_of=$parent_id&depth=$depth&echo=".(!$return)."&title_li=0&sort_column=menu_order");
echo'
</div><div class="menufooter"></div>'; }
if($return) {
return $html;
} else {
echo $html; } }
?>
Beiträge von andrea99
-
-
ich habe mein problem jetzt teilweise selbst gelöst und entsprechend editiert,es wäre sehr lieb wenn mir jemand bei dem zweiten teil helfen könnte
-
Ich habe seit einiger Zeit ein Problem mit meiner Navigation. Und zwar möchte ich,dass alle aktiven Links sichtbar sind.
Nun habe ich das schon so hinbekommen,dass die obere Navigation dass macht,doch sobald ich bei der subnavigation auf einen unterpunkt klicke,werden alle unterpunkte der dritten ebene als aktiv angezeigt.Ich habe so einiges im Internet gelesen, dass man auch current_page_parent oder current_page_ancestor zuordnen sollte nun weiss ich aber leider nicht wie ich dass genau in mein css zuordnen soll.Ich habe so einiges probiert und es funktioniert die ganze Zeit trotzdem nicht.
ich hoffe mir kann jemand helfen!auszug aus meinen css
#leftcol{ width:205px; float:left; position:relative; padding:10px 0px 20px 25px;}
#leftcol h1, #leftcol h2, #leftcol h3, #leftcol h4, #leftcol h5, #leftcol h6 {font-family:arial; color:#000000; font-size:15px; margin:0px; padding:0px 0px 3px 0px;}#leftcol ul {padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;list-style: none; width:180px; clear:both;}
#leftcol ul li{margin: 0px 0px 0px 0px; display: block; font-family: arial; font-size: 14px; text-decoration:none; font-weight:bold;}
#leftcol ul li a{ width: 149px; display: block; background:url(img/menu_li.gif) top left no-repeat; padding: 6px 5px 3px 26px; text-decoration:none; color:#000000; vertical-align: bottom;}
#leftcol ul li a:hover{ background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li.gif); text-decoration:none; color:#FF0099; }#leftcol ul li ul{margin: 0px 0px 0px 10px; display: block; font-family: arial; text-decoration:none; font-weight:bold;}
#leftcol ul li ul li{margin: 0px 0px 0px 0px; display: block; font-family: arial; font-size: 14px; text-decoration:none; font-weight:bold;}
#leftcol ul li ul li a{ width: 140px; display: block; background:url(img/menu_li_sml.gif) top left no-repeat; font-size: 12px;padding: 6px 5px 3px 25px; text-decoration:none; color:#000000; vertical-align: bottom;}
#leftcol ul li ul li a:hover{ background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li_sml.gif); text-decoration:none; color:#FF0099; }#leftcol ul li ul li ul{margin: 0px 0px 0px 10px; display: block; font-family: arial; text-decoration:none; font-weight:bold;}
#leftcol ul li ul li ul li a{ width: 130px; display: block; background:url(img/menu_li_sml.gif) top left no-repeat; font-size: 11px; padding: 6px 5px 3px 25px; text-decoration:none; color:#000000; vertical-align: bottom;}
#leftcol ul li ul li ul li a:hover{ background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li_sml.gif); text-decoration:none; color:#FF0099; }#leftcol a{ font-family: arial; text-decoration:none; color:#000000;}
#leftcol a:hover{ font-family: arial; text-decoration:none; color:#FF0099;}
#leftcol .current_page_item a { background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li.gif); font-family: arial; text-decoration:none; color:#FF0099; }