Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Using wp_enqueue_script with social media buttons?

Put everything between <script> & </script> in a separate file. Then use wp_enqueue_script with the correct path of the file & dependencies to false. After that you can use only <a href="https://twitter.com/share" class="twitter-share-button">Tweet</a> to add the tweet button.


Related Posts:

  1. theme path in javascript file
  2. How to configure wordpress to work with Vuejs with SSR and without hashbang
  3. How to correctly add JQuery in a WP theme?
  4. using wordpress without javascript
  5. Theme Javascript.php Overwritten Nightly [closed]
  6. How can I wrap all blog posts image with
  7. Flexslider not working for my custom theme WordPress
  8. Theme customizer live preview JS- Trying to bind to an html image url without luck
  9. How to convert that page to a wordpress template? [closed]
  10. What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
  11. Sizing screenshot.png without losing aspect ratio
  12. What is the preferred way to add custom javascript files to the site?
  13. Does the functions.php file ever get called during an AJAX call? Debug AJAX
  14. How to add CSS class to custom logo?
  15. How to add custom css file in theme?
  16. pass object/JSON to wp_localize_script
  17. get_template_part vs action hooks in themes
  18. Solutions for generating dynamic javascript / CSS
  19. The the_post_thumbnail without srcset?
  20. The proper way to include/require PHP files in WordPress
  21. after_setup_theme always runs
  22. Do I actually need to link my theme’s style.css in the theme files
  23. Using classes instead of global functions in functions.php
  24. WordPress API Menu/Submenu Order
  25. How to insert a logo in the header?
  26. How to move page template files like page-{slug}.php to a sub-directory?
  27. CSS classes for theme
  28. Add custom classes to anchor in wp_nav_menu
  29. How to remove search bar from a wordpress theme? [closed]
  30. Should `get_template_directory_uri()` be escaped?
  31. Get url of thumbnail from the media uploader
  32. My child theme doesn’t work Error: “The parent theme is missing. Please install your parent theme”
  33. How To Add New Option Types To Option Tree?
  34. WP 3.4 – what action/hook is called when theme customisation is saved?
  35. What WP folder can I use to write files to?
  36. Are the WordPress Core CSS styles really all nessesary?
  37. Add a dropdown to theme customizer
  38. Should I use set_transient or update_option?
  39. Why doesn’t default WordPress page view use force_balance_tags?
  40. Proper, exhaustive documentation for wp.editor etc
  41. Page template in two level deep folder
  42. Any alternate TinyMCE4 themes / subthemes?
  43. Theme Customizer : how to create multiple-level panel
  44. Why I can’t add a CSS style in this WordPress theme?
  45. Theme file for all pages that are a child of a specific page
  46. Allow Shortcode in Theme Customizer
  47. Where to post/upload the new theme for WordPress theme repository
  48. Setting multiple default background images?
  49. Template for individual post designs
  50. How to make a theme with more than one CSS file?
  51. Is it good to rename theme folder downloaded from WordPress.org?
  52. Best practice way to implement custom sections into a WordPress theme
  53. Editing the custom background CSS
  54. What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
  55. register_sidebar ignores ‘id’ and ‘class’
  56. Is there a way to set the order of wp_footer hooked functions?
  57. What, specifically, should be included in theme_name_setup()?
  58. How to get gallery images?
  59. Is it possible to use line break in theme description?
  60. Google Maps not displaying in wordpress using Google Maps Javascript API
  61. Is the theme customizer slowing down my site?
  62. Trigger Customizer saving process with Javascript only
  63. How can I get wp_head() as a string instead of echoing it?
  64. Display a different theme for not logged-in users
  65. Best practice (forward compatibility) for theme options
  66. Automatic Updates For Private And Commercial Themes?
  67. Add colors to existing color palette without replacing it
  68. Child Theme not loading parent CSS
  69. What can I hook into after_setup_theme?
  70. Where do I find the functions triggered within a hook?
  71. What does “Do not deregister the jquery script in the administration area” mean?
  72. What is the best book to learn how to make themes for wordpress?
  73. Grab the first paragraph of each post
  74. What is the best practice for customizing a plugin’s JavaScript/jQuery?
  75. add_image_size is scaling, even though crop is set to true
  76. Use of undefined constant FS_CHMOD_DIR – assumed ‘FS_CHMOD_DIR’
  77. How to show next Post Thumbnail image in WordPress using current post id
  78. Symlink a directory to wp-content/themes
  79. Single Page WordPress Theme – Using page templates
  80. How do I make my wordpress page more friendly for mobile viewers?
  81. Pushing updates to your premium theme
  82. Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
  83. Where can I find a good reviewed collection of Twenty Ten child themes?
  84. How to check if post has any tag?
  85. What are WooCommerce starter themes? [closed]
  86. How do I get gallery thumbnail URL and change the default thumbnail size?
  87. Front End Post Submit Form
  88. How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
  89. How do I get a parent theme modification from a child theme?
  90. Removing the default sidebar from admin panel
  91. How do I remove RSS feeds from themes?
  92. Select menu on browser resize
  93. Changing the entire control choices using wp.customize with JavaScript
  94. How to disable the gradient and font size internal CSS added by WordPress when using theme.json
  95. Check javascript file Proper way in functions.php
  96. add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
  97. How to Change CSS Variable value in Theme Customizer Live Preview
  98. Is there an error in get_the_tag_list()?
  99. CSS in child theme not overriding the parent theme [closed]
  100. Example of a theme organization without all the default wp files in root
Categories theme-development Tags javascript, social-sharing, theme-development, themes
list or get meta_key where meta_value is ‘something’
SSL problems with WordPress

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress