Using Custom Field to add Javasccript Call – How To?
-
I want to add SWFObject.js via a Javascript script call so I can place some Flash SWFs in WordPress Pages. In the past I’ve found the closing tag for the page header and placed it there. But my theme has several header.php variants, and the theme author is suggesting a different approach.
Most easy way is use custom field.
1. create custom field key ‘meta’
2. value paste your script code.Please try custom field key name ‘css’, ‘javascript’.
There’s a bit of a language barrier, plus I don’t want to bother him with basic WordPress usage questions. How would I use what he is suggesting to add this to the header of a WordPress Page:
<script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> swfobject.registerObject("myId", "9.0"); </script>
Thanks!
- The topic ‘Using Custom Field to add Javasccript Call – How To?’ is closed to new replies.