The principe is simple: You first got top create a function that will simply print the required files. Then, you got to hook it to the wp_head() WordPress function, by using the add_action() function.
function GetLastPostName_head()
{
echo '<script type="text/javascript" src="'.get_settings('siteurl').'/wp-content/plugins/slidelastposttitle/mootools.js"></script>';
echo '<script type="text/javascript" src="'.get_settings('siteurl').'/wp-content/plugins/slidelastposttitle/blackbox.js"></script>';
}
add_action('wp_head', 'GetLastPostName_head');
Credits goes to X-OR for this awesome recipe!
Leave a Comment