How to create social Share Buttons Without Plugin
How to create social Share Buttons Without Plugin
How to create social Share Buttons Without Plugin
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
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
As just previously answered, your problem likely simply is that you used the same ID (the 2nd argument for wp_editor() multiple times).
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
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
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
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
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.”&url=”.$shortURL.”&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
This is may be due to some crash database issue so take dump of database and try to reinstall with fresh copy. But before perform this long process please try below step for capabilities. The wp_capabilities saves the value as serialized array, you can try it in your php or for this example here. Using … Read more