Shade Tree Sites

Building Better Websites

Add pdf Filter to WordPress Media

Here’s a function that will add support to filter for pdf’s (or any other supported file type just change the slug)  in WordPress media. Add the following to functions.php:   function modify_post_mime_types( $post_mime_types ) { // select the mime type,  ‘application/pdf’ //

Continue reading

How to Add Facebook and Twitter Buttons Without a Plugin

Facebook Like Button: Add following to page, post, template where you want it to appear: <iframe src=”http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp; width=450&amp;action=like&amp;colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:450px; height:60px;”> </iframe> Options: Show the friend icons under the button:  show_face=true Display the

Continue reading

Display Post Thumbnails in RSS Feed

Code below will get the post thumbnail and automatically add it to your RSS feeds. Paste the code into functions.php and save the file. Your theme must support post thumbnails for this to work. function cwc_rss_post_thumbnail($content) { global $post; if(has_post_thumbnail($post->ID))

Continue reading