Using Pullquotes Part Two
Filed Under: Blogging, WordPress
In my previous post I showed you how to easily add pullquotes to your WordPress blog by simply adding a new class to the existing blockquote. Now I’ll show you a way to do it without manually adding class=”mag” to every blockquote tag. We do it by adding a new button to the Text Editor Toolbar.
Remember back in November when I showed you how to add a couple of buttons to the toolbar to automatically align images to either the left or right? (see Customizing WordPress Text Editor Toolbar) We are going to do the same thing here. The file we need is located at wp-includes/js/quicktags.js. Open up quicktags.js and look for the following at around line 60 …
edButtons[edButtons.length] =
new edButton('ed_block'
,'b-quote'
,'\n\n<blockquote>'
,'</blockquote>\n\n'
,'q'
);
Somewhere below that block of code add this …
edButtons[edButtons.length] =
new edButton('ed_pull'
,'p-quote'
,'\n\n<blockquote class="mag">'
,'</blockquote>\n\n'
,''
);
This will add a new button to the toolbar called p-quote. To add a pullquote to your blog just click that button. Below is a screen capture of what my new toolbar looks like. (click image to enlarge)
One thing to remember, since you are modifying core files the modification will vanish the next time you upgrade your WordPress install.
Thanks for visiting! If this is your first time here why not grab the RSS feed. You can also follow this discussion by checking the "Notify me of followup comments via e-mail" box or by subscribing to the comments RSS feed. Please scroll down to leave your comment.




No Comments so far. Add Yours Now!
Reply to “Using Pullquotes Part Two”
Please note: Comment moderation is in effect. It may take some time for your comment to appear. There is no need to resubmit it.
Management does not necessarily endorse or agree with comments left here. Management reserves the right to not publish comments it deems unfit. Play nice.