updated   : May 15, 2012
we now have 588 snippets
By : , on November 25, 2011 9:00 am

Remove p tag from around images in the_content

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the HTML p tag from around images in the_content.

read more
By : , on November 04, 2011 9:00 am

Add a custom class to wp_get_attachment_link

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a custom class to wp_get_attachment_link.

read more
By : , on September 26, 2011 9:00 am

Display wp_list_pages with dynamicly created exclude list

wordpress snippet

Adding the first snippet to the functions.php of your wordpress theme will use wp_list_pages but filter out any pages that contain no content creating an excluded_pages array. Then add the second snippet into your wordpress theme in the location you wish to display the pages.

read more
By : , on August 15, 2011 9:00 am

Custom column with currently active page template

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a column to your admin pages showing which wordpress page template currently in use.

read more
By : , on July 27, 2011 9:00 am

Display total published words in “Right Now” admin dashboard

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will display the total number of published words from posts and pages. This is displayed at the bottom of the “Right Now” box in your wordpress admin dashboard.

read more
By : , on July 25, 2011 9:00 am

Add parent page slug to body_class

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add the parent page slug to the body_class. Displayed like this <body class=”parent-PAGESLUG”> this can be a great way if you need to style elements on specific pages.

read more
By : , on July 18, 2011 9:00 am

Unlimited number of child pages using wp_list_pages

wordpress snippet

Adding this snippet to the sidebar.php of your wordpress theme will use wp_list_pages to display all child pages regardless of depth. This is something I have not found online and needed for a current theme I’m working on, enjoy!

read more
By : , on July 17, 2011 9:00 am

highlight post_states within admin posts and pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will highlight the posts_states within the admin post and page sections.

read more