[Tutorial] How to correctly include SWFobject within WordPress

There are two options. The first option is to download the latest version of SWFObject then save it in your theme folder and include it in your <head>

<script type="text/javascript" src="<?php bloginfo("template_url"); ?>/js/swfobject.js"></script>

The second option is to use the internal WordPress version. This version is normally not up to date with the upstream version but if you do not require features of upstream version, I highly recommend you to go for this way, include following code in your <head> tag

<?php wp_enqueue_script("swfobject"); ?>
<?php wp_head(); ?>


About Jones Lee

Nothing much about me..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: