Posts

Showing posts from January 10, 2012

Set limit wp_nav_menu

<?php $pages = wp_nav_menu( array( 'container_class' => 'menu1' ,'menu'=> 'Main Navigation','theme_location' => 'menu1', 'menu_class' => 'dropdown', 'echo' =>false,'container' => false ) );?> <ul class="dropdown"> <?php $limit = 5; $pages_list = preg_replace(array('#^]*>#','#$#'), '', $pages); $pages_arr = explode("\n", $pages_list); for($i=0;$i<$limit;$i++){     echo $pages_arr[$i]; } ?> </ul>

Easy way to automatically resize large images

div.banner img { max-width: 500px; width: expression(this.width > 500 ? 500: true); }