Thread Starter
Rhand
(@rhand)
I read http://wordpress.org/support/topic/269603?replies=3 and found a plugin there that could help. But I would prefer to just hardcode this in the header.php. Any ideas?
Thread Starter
Rhand
(@rhand)
basically I just need to add a list item above each page titel with an image as a background or just and images and followed by the page title. But I would need the image to link to the same page as the page title link generated by wp_lis_pages… That’s my issue.
My current navigation code is now:
<ul id="nav">
<li <?php if ( is_home() ) { ?> class="current_page_item" <?php } ?>><a href="<?php echo get_option('home'); ?>/"><strong>Home</strong></a></li>
<?php
$pages = wp_list_pages('sort_column=menu_order&title_li=&echo=0');
$pages = preg_replace('%<a ([^>]+)>%U','<a $1><strong>', $pages);
$pages = str_replace('</a>','</strong></a>', $pages);
echo $pages;
?>
</ul></div>
couldnt you just:
#nav ul li {
background: url(images/icon.png) no-repeat;
}
or if that doesnt work:
#nav ul li a {
background: url(images/icon.png) no-repeat;
}
if you dont have room for the image… then just add some padding