Adding a Media Button to the WordPress Content Editor

According to what you have posted, the action “wp_enqueue_media” is missing for the function “include_media_button_js_file”. In this case, the JavaScript file “media_button.js” would never be loaded. By the way, the function “wp.media” opens the media dialog for uploading or selecting images. However, you cannot enter any text in this dialog. Maybe the following example will … Read more

Gutenberg button removed on save if its empty

https://github.com/WordPress/gutenberg/pull/29717 This PR adds a check for button text before rendering the Button block on the front-end. This prevents an empty from displaying on the front-end. What you are trying to do is considered a bug and was fixed in March 2021. The result was empty tags which cause validation and accessibility issues, as well … Read more

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