Text Widget oEmbed – The Plugin
The other day I posted about a theme trick to add the ability to insert embeded video using the WordPress oEmbed functionality using a text widget. This is now available as a plugin.
The theme can be found in the WordPress Plugin Directory
Support questions can be posted in the comments section of the plugin page here.
Auto-Embed Media in WordPress Text Widgets
I’ve used a trick for quite awhile that allows me to place shortcodes in the text widgets on my site.
WordPress 2.9 was released with the ability to auto-embed media, such as youtube videos, in posts by simply pasting a plain text URL into the post content. I have thought for some time that it would be really great to be able to borrow from the idea behind the shortcode in text widget trick to enable the same auto-embed functionality in my text widgets.
With the help of a couple of my fellow StudioPress forum moderators, Charles Clarkson and Gary Jones, I now have a solution! The YouTube video in the footer of this site, for example, is placed using the [embed]
shortcode to automatically embed the video.
This trick can be acomplished by adding the following code to the functions.php file in your sites active theme directory.
//Enable AutoEmbeds from Plain Text URLs in Text Widgets
add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );
add_filter( 'widget_text', array( $wp_embed, 'autoembed'), 8 );
This should allow both plain text urls in text widgets and the [embed]
shortcode:
Examples:
www.youtube.com/watch?v=ymwkZC5_hY8
Would look like this:
[embed ]www.youtube.com/watch?v=ymwkZC5_hY8[/embed]
Would look like this:
Westchester/Hudson Valley WordPress Meetup Presentation
Child theme can be downloaded from here
WordCamp Chicago 2010, Retrofitting WordPress Themes
This is the slideshow from my presentation at WordCamp Chicago 2010. It covers adding support for custom navigation menus to existing themes. Custom Menus are a new feature for WordPress 3.0 that will make adding very flexible navigation menus to your site very easy.
Search Engine Optimization
This pretty much sums up my feelings about Search Engine Optimization tactics in general. 1% Common Sense and 99% Craziness.
Follow Daisy!