AddToAny Share Buttons
The AddToAny Share Buttons plugin for WordPress increases traffic & engagement by helping people share your posts and pages to any service. Services include Facebook, Bluesky, Mastodon, Pinterest, WhatsApp, LinkedIn, Threads, Tumblr, Reddit, X, WeChat, and many more sharing and social media sites & apps. AddToAny is the home of universal sharing, and the AddToAny plugin is the most popular share plugin for WordPress, making sites social media ready since 2006. Share Buttons Standard share buttons — share each piece of content Floating share buttons — responsive & customizable, vertical & horizontal Counters — fast & official share counts in the same style Follow buttons — social media links to your Instagram, YouTube, Discord, Snapchat Image sharing buttons – share buttons for sharing images Vector share buttons & follow buttons — custom color SVG icons Custom share icons — use your own if you prefer Official buttons including the Facebook Like Button, Pinterest Save Button, and LinkedIn Share Button Universal email sharing makes it easy to share via Gmail, Yahoo Mail, Outlook.com (Hotmail), AOL Mail, and any other web or native apps Custom Placement & Appearance Before content, after content, or before & after content Vertical Floating Share Bar, and Horizontal Floating Share Bar As a shortcode, or a widget within a theme’s layout Programmatically with template tags Analytics Integration Google Analytics integration (access guide) for sharing analytics Track shared links with Bitly and custom URL shorteners Display share counts on posts and pages WordPress Optimized Loads asynchronously so your content always loads before or in parallel with AddToAny Supports theme features such as HTML5, widgets, infinite scroll, post formats Supports WooCommerce, multilingual sites, multisite networks, and accessibility standards AddToAny is free — no signup, no login, no accounts to manage Mobile Optimized & Retina Ready AddToAny gives users the choice in sharing from a service’s native app or from a web app Responsive Floating Share Buttons are mobile ready by default, and configurable breakpoints make floating buttons work with any theme AddToAny’s SVG icons are super-lightweight and pixel-perfect at any size, and AddToAny’s responsive share menu fits on all displays Automatic AMP (Accelerated Mobile Pages) support for social share buttons on AMP pages Customizable & Extensible Choose exactly where you want AddToAny to appear Easily customize sharing on your WordPress site Highly extensible for developers and designers Custom icons let you use any icons from any location (media uploads directory, CDN, etc.) Many more publisher and user features Wide Support Over 10 years of development Over 18 million downloads Translated into dozens of languages Ongoing support from the community This plugin always strives to be the best WordPress plugin for sharing. Development is fueled by your kind words and feedback. Share this plugin See also: The share buttons for all platforms The share buttons for WordPress.com AddToAny Blog | Privacy Policy
Top keywords
- share22×4.79%
- buttons15×3.27%
- addtoany10×2.18%
- share buttons10×2.18%
- sharing9×1.96%
- wordpress6×1.31%
- content5×1.09%
- custom5×1.09%
- floating5×1.09%
- icons5×1.09%
- floating share4×0.87%
- media4×0.87%
(MB) YouTube Widget
The YouTube videos widget lets you quickly and easily display your most recent YouTube videos in your blog’s sidebar. Features The YouTube videos widget is fully-based on the WordPress Plugin API. Uses hooks and filters to allow for maximum hackability by theme designers and developers. Organized straightforwardly so that it’s easy to modify and style. Usage The YouTube videos widget is ready to use as-is, although you can easily customize it to your liking with a bit of code. You can also insert a plain list of your recent videos into posts and pages with the shortcode mechabyte_youtube. For example, to load 5 videos from freddiew that open in new tabs, you’d use [mechabyte_youtube username="freddiew" videos="5" tab="true"]. Custom Styles The YouTube videos widget loads it styles by hooking into WordPress’ wp_enqueue_scripts action. To remove the default styling you need to remove the our enqueue_scripts function from the hook. remove_action( 'wp_enqueue_scripts', array( 'mechabyteYouTube', 'enqueue_scripts' ) ); Custom Output The end user has two options of displaying their YouTube videos: in plain or decorated lists. When modifying the output of the plugin you must use one of two filters that this plugin uses: mbYT_construct_plain and mbYT_construct_decorated. Before you add your own functions to either filter, you must remove the default ones that are used automatically: mbYT_construct_plain_default and mbYT_construct_decorated_default. remove_filter( 'mbYT_construct_plain', array( 'mechabyteYouTube', 'mbYT_construct_plain_default'), 10, 3 ); remove_filter( 'mbYT_construct_decorated', array( 'mechabyteYouTube', 'mbYT_construct_decorated_default'), 10, 3 ); Now it’s time to get creative. When creating a function that will loop through the videos you have complete control over how you want to display the content. Just keep in mind that in the end, you should be outputting elements. When filters are being applied to the YouTube content, there are three arguments that are being passed through: $youtube_videos (array, the array of videos), $number (integer, the number of videos the user wishes to display), and $tab (boolean, a true/false value of whether or not the user wants to open video links in a new tab). Keep in mind that you have access to the following pieces of information when creating your video loop: $item['title'] // Video title $item['videoID'] // Video ID $item['viewCount'] // Video view count $item['published'] // Video publish date -- UNIX $item['duration'] // Video duration in hh:mm:ss $item['numLikes'] // Video likes count $item['link'] // Video link $item['image']['default'] // 'Default' thumbnail (low quality) $item['image']['mqdefault'] // Medium quality thumbnail $item['image']['hqdefault'] // High quality thumbnail Here’s an example of some code that adds a custom function to our mb_construct_plain filter (assuming we’ve already removed the default functions). Keep in mind the 3 at the end. That lets WordPress expect our three arguments that will be passed through. Check out WordPress’ add_filter() page for more info. add_filter( 'mb_construct_plain', 'construct_plain_example', 10, 3 ); function construct_plain_example( $youtube_videos, $number, $tab ) { $output = ''; foreach( $youtube_videos as $youtube_video ) { // If we've reached the user's display limit, end the loop if( $i == $number ) break; $output .= ' '; $output .= ' '; $output .= $youtube_video['title']; $output .= ' '; $output .= ' '; $i++; } return $output; } Pretty basic, but it allows you to see a general example of how to loop through the objects and return the modified data. The above code will produce a list element like this one: Real Life Portal Gun