Tutorial Added Adding Custom Buttons to Editor WordPress


Sponsored Links




I was written about Customize WordPress WYSIWYG Editor, and on this tutorial is another one. Today we will show you how to adding Custom Button to WordPress Editor. There are so many advantage why we need to added custom button. We can easy added content using Custom Button, we can added extra functions on our WordPress write panels.

WordPress Custom Buttons - Pretty Girl

WordPress Custom Buttons - Pretty Girl

Let’s get started, on this chapter we will added Google AdSense inserted button on our HTML Editor. Before you added this button, you need to create Google AdSense shortcode on your functions.php, this is example

function do_adsense() {
  $adsense = "You Adnsese Code Here";
  return $adsense;
}
add_shortcode('adsense', 'do_adsense');

After you write down the Custom Buttons for you Google AdSense above, the next step is write the code below, please not this code must be written on quicktags.js in the wp-includes/js, but you need to replace this original version (compressed version) with quicktags.dev.js and alter the code by added this

edButtons[edButtons.length] =
new edButton(‘ed_adsense’
,’adsense’
,’[adsense]’
,’’
,'adsense'
);

That’s simple right? save you work and Rerfresh/Reload you Write Post panel. And there you go, you got New Custom Buttons.

References:

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net


6 Responses to Tutorial Added Adding Custom Buttons to Editor WordPress

  1. Pingback: Tweets that mention How To Adding Custom Buttons to Editor Wordpress # WordPress Tricks & Tips -- Topsy.com

  2. Web Design says:

    Thank you, nice tutorial. :)

  3. Pingback: Tutorial Multi-Site option in WordPress 3.0 | Unlock IMEI Cellphones

  4. Leichim says:

    Nice way of quickly integrating adsense into wordpress!May I ask what plugin you are using to display your code in this post?

    Kind regards.

  5. Pingback: Tutorial Multi-Site option in WordPress 3.0 | Silver Blog

  6. Niraj says:

    Hello
    I need some help
    in dashboard, in add new post if i want that to enter some different data which will appear on the top of the post with some separate text boxes?How to do it?
    for e.g:-
    there is a website of universities information(in wordpress), in add new posts i m entering some post
    but i want that before the post nd after the heading i should get some fields like this
    Name:
    Location:
    Details:
    then the post should continue
    but there should be some kind of text boxes nd labels in dashboard so it makes more easier to enter the data
    is it possible?
    or is der ne plugin to add such thing

    plzzz help

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>