Monthly Archives: January 2011

Dynamically redirect non-www to www (or vice versa) without hardcoding using .htaccess

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

firefox greasemonkey directory mac

Posted in Software, Tech Tips | Tagged , , | 1 Comment

How To Enable Color in Terminal on Mac OS X for Root

Posted in Mac, Tech Tips | Tagged , , , | Leave a comment

Adobe Illustrator Could Not Find The Linked File [Solved]

Posted in Mac, Software, Tech Tips | Tagged , , , , , , , , , , , , , | 31 Comments

How to Remove the <ul> container with the wp_nav_menu function

Although WordPress has an option to remove the container from the wp_nav_menu function, that is generally for the <div> and not the <ul> that wraps the <li> items. So, while you can use the options to remove the <div>, the <ul> will stay. It might be good to use a filter method like add_filter( ‘wp_nav_menu’, ‘remove_ul’ ) to accomplish the filter I have below, but that the filter was not being applied at the time of writing, so I (used to) recommend changing the echo option to false, and returning the value of the wp_nav_menu function to a variable, and then running a regular expression on it to remove the encompassing </ul><ul> and </ul>. This code worked for me, running WordPress 3.0.4: $options = array( ‘echo’ => false ,’container’ => false ); $menu = wp_nav_menu($options); echo preg_replace( array( ‘#^<ul [^>]*>#’, ‘#</ul>$#’ ), ”, $menu ); Use Site Pages as a Default Fallback If you want it to use the site’s pages as a default (if no menu is specified and the function is called), you can add an additional function and change the options array as shown: function default_page_menu() { wp_list_pages(‘title_li=’); } $options = array( ‘echo’ => false ,’container’ => false ,’fallback_cb’=> ‘default_page_menu’ ); $menu = wp_nav_menu($options); echo preg_replace( array( ‘#^<ul [^>]*>#’, ‘#</ul>$#’ ), ”, $menu ); Update: A Better Way to Remove the <ul> element I think as of WordPress 3.1 they added a new parameter to make it easier to get rid of the </ul><ul> that wraps the … Continue reading

Posted in Tech Tips, Web Development | Tagged , | 9 Comments

Applescript: Unhide / Restore All Windows

Posted in Mac | Tagged , | 1 Comment

Facebook Forced Profile Upgrade

Posted in Marketing, Social Media | Tagged , | 2 Comments

googleapis latest jQuery

Posted in Web Development | Tagged | 1 Comment

A sort of “text-to-speech” iPhone app which can help Children

Posted in Mac | Tagged , | Leave a comment

How to e-mail a Screen Grab / Screen Shot (Windows & Mac)

Posted in Tech Tips | Tagged , , , | Leave a comment