Share buttons Facebook Twitter, just like wordpress.com without webservice

Why go for a plugin at all?? all you want is twitter & facebook share / tweet right ? You can do this: 1. embed this shortcode in your functions.php (or shortcode page if you got one) function shreplz() { return ‘ <div class=”sharebox”> <div class=”twittme”><a name=”fb_share”></a> <script src=”http://static.ak.fbcdn.net/connect.php/js/FB.Share” type=”text/javascript”></script></div> <div class=”shareface”><a href=”https://twitter.com/share” class=”twitter-share-button” data-count=”horizontal”>Tweet</a><script … Read more

wp_enqueue_script() not working

The social network button you posted comes in two distinct parts. First, the button itself is defined by the anchor tag. <a href=”http://svejo.net/submit/?url=[your url]” data-url=”[your url]” data-type=”compact” id=”svejo-button”>Add in Svejo</a> Then, presumably the script replaced that button with an iframe or something similar so you don’t have to send your users elsewhere to get it … Read more

TinyMCE: Move buttons from 2nd row to top row

Solved it. So, in order to move the default buttons from first row to second row, we will need to hook into the mce_buttons filter: function move_mce_buttons_to_top($buttons) { $buttons[] = ‘redo’; // buttons return $buttons; } add_filter(‘mce_buttons’, ‘move_mce_buttons_to_top’); Then, to add the Paragraph drop-down to top row, we will add them as custom styles. Firstly, … Read more

Putting a space between the buttons [closed]

This is less of a WordPress question and more of a styling questions but here is some feedback anyway. You could create a class and use your themes style.css or for examples below, inline CSS. You can either use the word-spacing property or left/right padding on some span elements to get the desired spacing. <?php … Read more

Create special button on WP Tiny MCE Posts Editor for Shortcodes

Your functions have nothing to do with each other. Is all you want a button that when clicked adds [tooltips class=”top_tooltip” title=”Your Tooltip here”] Text here [/tooltip] to the editor? — This is currently what your doing — First Function: function tooltip( $button ) is adding your tooltip shortcode Second Function: mce_tooltip( $button ) is … Read more

Generate Own Custom CSS Button with icon

What you are seeing is from a short code, a shortcode that does not exist anymore. Since you’ve changed themes and seeing this, it means that that shortcode is defined in your previous theme’s functions.php What you’ll need to do is, look at your previous theme’s functions file, and locate where the shortcode is defined. … Read more

How to implement custom buttons into individual posts?

Here is a simple way to add custom sharing buttons (just place this code where you want your sharing buttons to be displayed): <?php $twitter_username=”your_twitter_username”; $shortURL = esc_url(get_permalink()); $shortTitle = esc_attr(get_the_title()); $imgURL = wp_get_attachment_url( get_post_thumbnail_id() ); $twitterURL = ‘https://twitter.com/intent/tweet?text=”.$shortTitle.”&amp;url=”.$shortURL.”&amp;via=”.$twitter_username; $facebookURL = “https://www.facebook.com/sharer/sharer.php?u=’.$shortURL; $googleURL = ‘https://plus.google.com/share?url=”.$shortURL; $pinURL = “http://pinterest.com/pin/create/button/?url=”.$shortURL.”&media=”.$imgURL.”&description=’.$shortTitle; ?> <a class=”facebook-btn” href=”https://wordpress.stackexchange.com/questions/191983/<?php echo $facebookURL; ?>” … Read more