Image in menu
-
Hi,
I would like to add images for each part in my menu.
I added <img> brackets in my custom menu like that:
<img src="https://www.mywebsite.com/wp-content/themes/twentyten_child/images/button_offer.png" style="width: 125px; height: 125px; padding: 0; margin: 0;">Our Offer
but then I don’t see anything on my website.
I have a child theme and my <nav> is not into my header anymore. Actually it is in my home page template:
<?php /* Template Name: home */ ?> <?PHP get_header('home'); ?> <?PHP get_template_part( 'loop', 'index' ); ?> <nav id="access_home" role="navigation"> <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?> <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></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( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> </nav><!-- #access --> <?PHP get_footer('home'); ?>
Can it create problems ?
Any idea how I could solve it ?
Many thanks,
Xavier
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Image in menu’ is closed to new replies.