Regarding Embedding Scripts in your Wordpress posts

Hello Friends,

I need to know the way to embed java scripts / any live score scripts in my wordpress post by just using a code like this [score].

Basically I have used this in the past by using [score] on the post and that automatically uses the custom funtions php file of my theme to find out what is the exact live score to embed. My designer had done it for me and I now don’t own the site and have forgotten.

Could you please help?

Regards,
Hemanth

You need to register a shortcode in your functions.php file

Add something like this

function myshortcode(){
return '<script>js code</script>';
}
add_shortcode('score', 'myshortcode')

check out the shortcodes api here

http://codex.wordpress.org/Shortcode_API

Umm I don’t know what you are trying to do then. Would be move this thread to Wordpress forum or you post this problem in wordpress forum here in Sitepoint yourself.

No mate. I have the live score scripts with me. They contain the words <script>code…</script>. As long as you are in the html mode its fine. Once you enter the wordpress visual editor the lines disappear. So I usually use to place something custom defined from my functions.php which actually contains the live score script. So something like [score] / [livescore] or whatever.

If I am not wrong, there must be a plugin to parse your key [score] in the post. So try to remember the plugin used before and download it and install in your current worpress them your [score] will be parsed by plugin.

Edit:
Is this the one LIVE Score plugin?

Or try to find some more results here:
http://wordpress.org/extend/plugins/search.php?q=score&sort=