This is my repository of code snippets, url links, and other stuff  that I use to develop website with.  The main purpose of this site is to catalog, and easy search for the stuff that I use on a regular basis.

Get first image from content

March 26, 2013

The following functions are useful especially when pull an rss feed from a remote site, and you want to display the first image in the post. returnImage() will return the first entire image tag, which can then be passed to scrapeImage to return just the image source.

Add .last class to menus

March 26, 2013

Adding this code to the functions.php file will append the class “last” to the last li tag outputed by wp_nav_menu. Very useful for when you need to style the last link in a drop down menu different from the others, or to remove that a separate after the last link in a horizontal menu.

Scroll to Top