Put that script into a file somewhere in your theme folder. Include it using the following code in your theme’s functions.php file:
<?php
function wpa_65602_enqueue_scripts() {
wp_enqueue_script( 'facebook', get_bloginfo( 'template_url' ) . '/path/to/script.js' );
}
add_action( 'wp_enqueue_scripts', 'wpa_65602_enqueue_scripts' );
Related Posts:
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- Registering Class methods as hook callbacks
- How to customize woocommerce related products? [closed]
- Why does wp_enqueue_style() in plugin not load stylesheet?
- Edit plugin without hooks in functions.php
- How can I log a user out of WordPress before the page loads?
- WP showing “warning: call_user_func_array()”, What to do?
- Modify featured image URL at runtime
- Seeking clarification on page request life-cycle
- Which hook should be used to validate custom form fields on the login form?
- Hook (upgrader_process_complete) running moment
- Pass A Value From Outside To A Plugin Variable
- Built in admin ajax hooks?
- Adding dynamic section to WordPress
- woocommerce product attributes
- How to filter content post only on save
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- How to find out what blocks are added by a plugin
- merging an array to an existing array using add_filter
- template_redirect not being called when using ajax
- How to add rewrite rules and pagination to retrieve attachments files?
- Hook before & after plugin / core update
- Plugin custom Action Hook not working
- What are ideal hooks to call register_sidebars?
- AddFilter option_active_plugins is executed 6 times. Why?
- get_plugins() doesn’t work after plugins_loaded
- Hook to generate a dynamic sitemap with “All in One SEO Pack” Plugin
- add_action in functions.php, do_action in plugin?
- How to correctly detect accessing wp-content/uploads?
- Deactivate Plugin on Theme Switch
- Plugin activation hook in an abstract class
- How to pull code snippet from functionality plugin?
- Using a post-signup hook to get user details
- Map a custom id to wordpress post id
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Trigger Elementor Popup via code [closed]
- Filtering WooCommerce Orders by Category
- do_action() hook into load-(page)
- Howto check version of another plugin and then add a submenu page to it
- Hook into existing tinyMCE button
- How to get post ID with hooks publish_post, new_to_publish, etc
- edit_user_profile and show_user_profile are not firing inside a class
- Add sub menu page in your plugin
- how to change automatic placing of social plugins below content?
- What exactly happens to function argument availability when using a filter?
- the_post hook is not firing for me
- Deactivate JS Script in Plugin Shortcode
- Create a post builder skin in a plugin
- Plugin Development – Functions or Hooks?
- How do I add some javascript validation to the admin interface form’s onsubmit?
- Hook for page Request?
- Adding Plugin Assets to Header
- Add item to the woocommerce dashboard menu from a plugin
- How to use the pre_option filter before a plugin loads?
- What are admin hooks
- How do I add $_SESSION[”] to my wordpress page?
- How to use filter to disable adding a product to wishlist?
- WordPress: Add custom add_filter for custom functions
- How to remove a class function from a plugin by using remove_action()?
- profile_update hook doesn’t works inside a class
- Function added to hook “new_to_publish” not executing – custom plugin
- Plugin: Hooking up classes that have their own hooks
- Hook for altering the content of all wp mails
- How to deactivate my plugin upon deactivation of NextGen
- Hook for plugin to insert into entry-meta
- Change Dashboard URL from wp-admin to wp-admin/index.php
- Use a hook or filter, or overwrite this Gamipress function?
- Hook from plugin doesn’t fire up from external PHP script
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- Callback hooked to post_updated firing on new posts as well
- Randomize post (and page) IDs on generation
- save_post hook partly firing in update post
- My plugin runs on every single WordPress page, but I want it to run only on activation
- The function called on the wp head hook becomes null
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Show post object of any page in frontend
- Use action, filter, or hook to append HTML to WordPress plugin function
- Passing function into add_action always returns the first argument
- Hook to display element as product on category page
- Is it possible to disable a theme programmatically?
- Customize plugin templates
- Hook on widget context plugin to add custom context for widget
- plugin not hooking to my custom hook
- wp_login_form() ignoring login_form action hook
- Modify a plugin’s content
- How should I use a plugin function as a hook?
- Plugin hook breaks new WP 4.0 media library grid view?
- Variable scope in plugin outside loop [closed]
- Checking url from plugin [duplicate]
- How to display a link in the footer section
- User register hook can’t access form request
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- How to Add Extra Text In WordPress Title Before Post Publish
- Why is my activator class adding the files/running the actions I add?
- Admin Notice is only localized when displaying the “Plugins” Backend Page
- Customize WP Filter Hook
- What is the best way to override functions of thirdparty plugins?
- Remove 3rd party plugin notices from within own plugin