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

Disable submit button order

Fixed the issue. Was calling the incorrect IDs. Below is the code I used for anybody else wanting to achieve the same outcome. <script type=”text/javascript” charset=”utf-8″> jQuery(document).ready(function($){ $(“.button#place_order”).click(function () { $(“.button#place_order”).attr(“disabled”, true); $(‘.checkout’).submit(); }); }); </script>

Convert to shortcode?

Look into the add_shortcode function, which can be part of the plugin (although I don’t recommend modifying other’s plugins, since your changes will be overwritten if they send out an update. So you would add this function to your ‘child theme’ function.php function add_my_shortcode() { add_shortcode(‘your-shortcode-name’, ‘the_function_for_your_shortcode’); } add_action(‘init’, ‘add_my_shortcode’); ..and here is the function … Read more

Divi theme: change overlay color from default blue to back [closed]

Some CSS to change the attributes of the ‘single_add_to_cart_button‘ CSS class (which is used for the button; I found that while using Firebug to inspect the button element). .single_add_to_cart_button:hover {color:#ccc; background-color:#444;} Adjust the colors as desired. Put this in the ‘additional CSS’ of the theme customization. Here’s a place to figure out colors: https://www.w3schools.com/cssref/css_colors.asp .