Month: July 2014

Plugin to set video thumbnails as featured images

The guys over at Webdevstudios published quite a neat new WordPress plugin. So, if you rely heavily on Youtube or Vimeo Videos in your blogposts, until now it was quite some work to extract the thumbnail out of the video in order to set it as a featured image.

The Plugin “Automatic Featured Images from Videos” starts exactly at this point. After you save your blogpost the plugin starts to search your blogpost for video links. It does not search all your blogpost, but just the beginning, since the plugin assumes important videos are in the beginning of a blogpost. So, the plugin just grabs the first 1000 characters of your blogpost.

Quick tipp: If you want all your blogpost to get searched, remove line 35, where it says

$content = substr( $content, 0, 800 );

Once a video is found, the plugin starts to extract the video thumbnail URL and places this as a featured image.

If you already have placed a featured image, the plugin stops of course and doesn’t overwrite the image, you have chosen. The plugin is online since the 16.07.2014 and got already nice responses.

So, if you are running a WordPress blog, which heavily relies on featured images out of Youtube or Vimeo videos, you should check out “Automatic Featured Images from Videos” since it can save you tons of time. The small plugins make the difference.

Stop Shortcode from being executed

For some of my Plugins, I use a WordPress page to explain how they work. Of course, on this page, I also activate the plugin to show, what this plugin can do.

But this means some trouble. Once, you want to explain the shortcode and you write the shortcode – well, the shortcode gets executed of course. So sometimes, it would be very useful to stop shortcodes from being executed.

So, I’ve developed another shortcode, which prevents shortcodes to get executed: [stop_shortcode].

How does it work? Lets say, I write an article, in which I explain the usage of a shortcode:

You have to use the plugins shortcode [stop_shortcode][this_shortcode_wont_be_executed][/stop_shortcode]

All you need are these four lines of code:

	add_shortcode( 'stop_shortcode', 'stop_shortcode' );
	function stop_shortcode( $attr, $content ){
		return $content;

Add them to your functions.php and you are done.