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.
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:
- http://www.wppanda.com/add-custom-buttons-to-wordpress-post-editor/
- http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/
- http://www.makeuseof.com/tag/how-to-insert-custom-quicktags-into-the-wordpress-editor/
- http://www.designersandbox.com/wordpress/adding-quicktag-to-the-html-editor-in-wordpress/
- http://www.tamba2.org.uk/wordpress/quicktags/




Pingback: Tweets that mention How To Adding Custom Buttons to Editor Wordpress # WordPress Tricks & Tips -- Topsy.com
Thank you, nice tutorial.
Pingback: Tutorial Multi-Site option in WordPress 3.0 | Unlock IMEI Cellphones
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.
Pingback: Tutorial Multi-Site option in WordPress 3.0 | Silver Blog
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