Only for users on old versions of IE function wpfme_IEhtml5_shim () { global $is_IE; if ($is_IE) echo ”; } add_action(‘wp_head’, ‘wpfme_IEhtml5_shim’);
Articles Tagged: In this site
Remove Paragraph Tags From Around Images
function filter_ptags_on_images($content){ return preg_replace(‘/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU’, ‘\1\2\3’, $content); } add_filter(‘the_content’, ‘filter_ptags_on_images’);
Add Link to WordPress “All-Settings”
As we’ve explained before, WordPress makes it easy to view and edit your blog settings from the Admin area. Thanks to a file named options.php, WordPress will display all of your database settings and enable you to edit a majority of them. To view this page, you need to log in as Admin and enter […]
Change the “Howdy” message to “Welcome”
This is what is running on this site: function change_howdy($translated, $text, $domain) { if (!is_admin() || ‘default’ != $domain) return $translated; if (false !== strpos($translated, ‘Howdy’)) return str_replace(‘Howdy’, ‘Welcome’, $translated); return $translated; } add_filter(‘gettext’, ‘change_howdy’, 10, 3); With this function you can customize the “Howdy” message in top right of your admin area. This […]
Function to change the length of Excerpt
Tested on: WordPress 3.0.1 By default all excerpts are capped at 55 words. Utilizing the code below you can override this default settings: function new_excerpt_length($length) { return 100; } add_filter(‘excerpt_length’, ‘new_excerpt_length’); This example changes the excerpt length to 100 words, but you can use the same method to change it to any value.