Login



Top-Navigation in Header einfügen code

hier ist die Anweisung und der code und css für das einfügen einer zusätzlichen Navigationsleiste im Header

ziemlich einfache Sache, wenn gewusst wie…

http://www.liewcf.com/blog/upload/wordpress-navigation-bar.txt

……

<!--
Top navigation bar for Wordpress default theme(Kubrick) by http://www.LiewCF.com/

Credit:
- CSS code ripped from http://binarybonsai.com/kubrick/
- idea to use wp_list_pages() enlighten by http://www.lamateporunyogur.com/pool

Apply:
Copy and paste all code here into the END of /wp-content/themes/default/index.php
-->

<style type="text/css" media="screen">
#supernav {
	font: bold 9px/9px Verdana, Lucida Grande, Arial, Helvetica, Sans-Serif;
	position: absolute;
	top: 201px;
	left: 50%;
	width: 720px;
	margin: 0 0 0 -360px;
	padding: 5px 16px; /* duplicate the tab size */
	text-align: left;
	display: block;
	}

#supernav li {
	margin: 0;
	padding: 0;
	text-transform: lowercase;
	display: inline;
	}

#supernav a {
	color: #FFFFFF;
	background: #63AAE7;
	font-weight: normal;
	height: 19px;
	padding: 5px 16px;
	/* round corner tab - not for IE */
	-moz-border-radius-topright: 6px;
	-moz-border-radius-topleft: 6px;
	}

#supernav a:hover {
	color: #111;
	background: white;
	text-decoration: none;
	/* round corner tab - not for IE */
	-moz-border-radius-topright: 6px;
	-moz-border-radius-topleft: 6px;
	}

#supernav .current_page_item a {
	color: #111;
	background: white;
	text-decoration: none;
	/* round corner tab - not for IE */
	-moz-border-radius-topright: 6px;
	-moz-border-radius-topleft: 6px;
}

#hack {
	background: white;
	height: 2px;
	width: 450px;
	display: inline;
	position: absolute;
	top: 220px;
	left: 50%;
	margin: 0 0 0 -350px;
	padding: 0;
	z-index: 2;
	}
</style>

und den folgenden php-code-Schnipsel in den header einfügen:

 <?php //highlight 'Blog' if not Page
if (is_page()) {
	$highlight = "page_item";
} else {
	$highlight = "page_item current_page_item";
}
?>

<div>
	<ul id="supernav">
		<li class="<?php echo $highlight; ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>
		<?php wp_list_pages('title_li='); ?>
	</ul>
</div>
<div id="hack"></div>
<!--
End - Top navigation bar for Wordpress default theme(Kubrick) -  by www.LiewCF.com
-->

dann die css ummodeln!!

0 Responses to “Top-Navigation in Header einfügen code”


  1. No Comments

Leave a Reply






Too Cool for Internet Explorer
Close
E-mail It