Friday, June 22, 2012

Wordpress for Beginners

Wordpress for Beginners


How to Alter the WordPress RSS Widget’s Refresh Rate

Posted: 21 Jun 2012 07:14 PM PDT

As amazing as the built in WordPress RSS widget can be there are times that it just doesn’t update fast enough. Thanks to the fact that WordPress is so easy to customize we can easily change this. In this article, we will show you how to alter the WordPress RSS Widget’s refresh rate.

All you have to do is add the following code to your theme’s functions.php file or into a site-specific plugin:

  add_filter( 'wp_feed_cache_transient_lifetime',      create_function('$a', 'return 600;') );  

In this example it is set to refresh every 600 seconds, or 10 minutes. Simply change this number to whatever you want and your RSS widget will refresh accordingly.

Source

How to Alter the WordPress RSS Widget’s Refresh Rate is a post from: WPBeginner which is not allowed to be copied on other sites.

How to Embed SWF in Your WordPress Posts

Posted: 21 Jun 2012 03:08 AM PDT

If you have ever tried embedding a Shockwave Flash file into your WordPress blog then you know it can get messy. Besides, if you are hosting your blog on WordPress.com then you are not going to be able to upload flash for security reasons. If you do have your hosting account, however, then there are several ways you can go about uploading .swf files to your WordPress blog posts. The first way involves using a plugin. This way is preferred if you are not good with code. The other way requires you to know some basic html. In this article we are going to go over how to embed SWF in WordPress posts with a plugin and without a plugin.

Plugin Method

First, you need to download and install Easy Flash Embed for WordPress. This plugin is so simple that no settings are even added to your admin menu. All you have to do is used a shortcode when you are creating your posts like this:

  [swf src="http://www.example.com/my-flash-file.swf" width=300 height=100]  

Simply replace the src attribute with a link to your flash file and adjust height and width accordingly.

Download Easy Flash Embed plugin.

Code Method

For those of you who would like more control over your code we are now going to show you how to embed flash files directly into your WordPress posts, pages, or even themes. Although people have come up with numerous methods for doing this over the years the easiest and most standards compliant way is to use the <object> element.

The final code looks like this:

  <object id="flashcontent"           classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"           width="550px"           height="400px">    <param name="movie" value="mymovie.swf" />       <!--[if !IE]>-->    <object type="application/x-shockwave-flash"             data="mymovie.swf"             width="550px"             height="400px">    <!--<![endif]-->         <p>        Fallback or 'alternate' content goes here.        This content will only be visible if the SWF fails to load.      </p>       <!--[if !IE]>-->    </object>    <!--<![endif]-->     </object>  

Note that you are using 2 <object> elements. The outer element is targeting Internet Explorer while the inner element is for all the other browsers. You can change your fallback text if necessary. You can also add extra <param> options like wmode or allowScriptAccess.

P.S. you should always use wmode=transparent, so your embed doesn’t override existing content such as a floating bar. Check out our article on how to prevent Youtube oEmbed from overriding content.

How to Embed SWF in Your WordPress Posts is a post from: WPBeginner which is not allowed to be copied on other sites.

No comments:

Post a Comment

Search This Blog

Top WordPress Seller