Hi,
ich versuche gerade die Standard Navigation von WP 3.2 (TewntyTen Vorlage) in mein eigenes Theme zu implementieren.
So weit bin ich nun:
-Text wird ausgegeben
-Formatierung wird angepasst (css)
es gibt nur folgendes Problem: Unterkategorieren werden nicht zugeordnet und somit auch nicht bei hover in einer box dargestellt. die subitems werden nur mitaufgeführt.
Bsp Mein derzeitiger Stand:
Home | Links: 1 | Links: 2 | Links 3 | Foto: 1 | Foto: 2
So soll es aber sein:
Home | Links | Foto
und so soll es dann gehovert aussehen:
Home | Links | Foto
>>>>> 1
>>>>> 2
>>>>> 3
(ignoriert die pfeile da oben, das sind platzhalter)
Ich hoffe mein Problem ist verständlich.
Folgend bin ich vorgegangen:
funtions.php:
<?php
if ( function_exists( 'register_nav_menu' ) ) {
register_nav_menu( 'MainMenu', 'Nav 1' );
}
?>
index.php
<nav id="access" role="navigation">
<h3 class="assistive-text"><?php _e( 'Main menu', 'Mainmenu' ); ?></h3>
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'Mainmenu' ); ?>"><?php _e( 'Skip to primary content', 'Mainmenu' ); ?></a></div>
<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'Mainmenu' ); ?>"><?php _e( 'Skip to secondary content', 'Mainmenu' ); ?></a></div>
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #access -->
Die Standard Style.css auf dem twentyten Ordner habe ich kopiert, unbenannt > Stlye_nav.css und in meine index.php implementiert:
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo get_template_directory_uri() .'/style_nav.css"'; ?> />
Was hab ich vergessen, was habe ich falsch gemacht?
Kann mir da jmd helfen? Oder gibt es ein komplettes Tut welches mir zeigt, wie ich genau dies mache?
mfg