What is it?
The JavaScript Pull-Quotes plugin is an add-on for WordPress that allows you to easily insert pull-quotes into your posts and pages. It uses client-side JavaScript specifically because, as a purely visual effect, it seems appropriate to avoid “doubling up” the text for people on text-only browsers or older browser that probably won’t properly handle the CSS involved. If a browser has JavaScript turned off, or otherwise somehow can’t handle the pull-quotes, then they should be completely invisible and out of the way.
How do I use it?
The plugin will look for any text that is inside a tag with a class of “pullquote”, and turn it into a pull-quote. <span class="pullquote">This sentence is a pull-quote, for example</span> — though in a real post the span tags will not be visible to readers as they are in this case! Via separate plugin you can add an automatic “Pull-quote” button to the post editor screen (see “extras” in the download); otherwise you should be able to add the <span> manually.
If you like, you can specify a particular side for a particular quote. To do this, simply set the span’s class to “pullquote pqRight” or “pullquote pqLeft”. This will put that one pull-quote on the chosen side completely independently of any other side-related options in use.
There is a options panel in the WordPress admin screen that allows you to set various options. I recommend you check it out before adding any pull-quotes to posts — you can find it under the Presentation section.
In the aforementioned options panel there is a control to select a style for pull-quotes, much like selecting a Theme in WordPress. There is also a preview button, so you can see what a particular style looks like without having to activate it first.
Sometimes you have a sentence with some subsidiary clause that you don’t want to include in the pull-quote. We’ve got you covered. If you have some text that you want to quote, but leave out extraneous, repetitious, or just plain unnecessary text, you put the alternate text in an <!-- HTML comment --> immediately inside the span. This last part is important — <span class="pullquote"><!-- You can put any alternate text you want in the comment -->the comment must be the very first thing inside the span</span>: no spaces, quote marks, or anything else comes first. (Again, the spans and comments will not be visible to your readers — this is just for demonstration purposes!).
Using alternate text in this way is of course completely optional If you like to keep things simple, just put the quotable text in a span as noted above and you’ll be fine. That’s about all there is to it.
Features
- The plugin is fully language-aware and ready for localization. German (Thanks Mattias), French (Merci Ben), and Italian localizations are included.
- Styles menu. The Options panel has a drop down menu that allows you to choose a visual style for your pull-quotes. Styles are easily customized and open for third-party contributions (similar to WordPress Themes).
- Preview styles without activating them
- A pull-quote style can be embedded in a WordPress theme. If the active theme has a file called “jspullquotes.css” in it, that will be used automatically.
- You can specify a side for a particular quote. To use, set span class to “pullquote pqRight” or “pullquote pqLeft”
- Successive pull-quotes can alternate sides
- Optionally strips links out of the quote text
- Have pull-quotes that differ from the “auto-quoted” text
- Allow user to choose default side
- Advanced options to specify the HTML tag and CSS classes to be used
Installation
Download the file, unzip it, and put the jspullquotes folder into your blog’s wp-content/plugins/ directory. Next activate it in the WordPress Plugins panel.
Download
- jspullquotes.zip v. 2.2
- jspullquotes.zip v. 1.7 (for WP versions lower than 2.5)
Is this download worth something to you? If you have found this system useful, please consider making a donation. Even as little as a dollar is appreciated:
Comments and suggestions are welcome.
Share the Love
If you like this plugin, please spread the word! I’ve made one o’ them handy sidebar link images that you can download and put on your own blog. Please link it to this page, of course! Here’s the image; just right-click and save:
![]()
Or, if you have the plugin installed, you can simply paste the following into your sidebar (you may need to change the image “src” path, depending on your site):
<a href="http://striderweb.com/nerdaphernalia/features/wp-javascript-pull-quotes/"><img src="/wp-content/plugins/jspullquotes/extras/jspullquotes.png" alt="JS Pull-Quotes" title="JavaScript Pull-Quotes" height="15" width="80" /></a>
Acknowledgements
Thanks to Roger Johansson and “Viper007Bond” for laying much of the groundwork that led to this plugin. See the readme.txt file included with the download for further details.
Thanks to Mattias for the German translation, Ben for the French, and to my wife’s friend Toni’s cousin Ralph for the Italian.
Last but not least, thanks to the fine folks at WordPress who made this all possible.
Troubleshooting/ Work-Arounds
- If you want to use this effect on a non-WordPress website, I suggest you check out the original script on Roger’s site, or my “no links” version.
- PROBLEM: You install it and nothing happens when you add the span tags to your post. SOLUTION: It may be your theme. Check in the
header.phpfile — the following line must appear somewhere in the section of your page (usually toward the end):
<?php wp_head(); ?> - BUG: There are issues with accented letters within alternate text comments that need to be fixed
- You may have noticed “alternate text” pull-quotes throwing errors when you have a double-dash in them. This is an obscure technicality of HTML rearing its head. Technically speaking, a double-dash ends an HTML comment, and that means the comment is ending earlier than you want it to.
- There is a bug in the JavaScript rendering of certain less common browsers, (such as older versions of Safari), which causes it to miss the alternate text. Assuming that some of your users probably do use these browser, you have two options:
- Do the alternate text as described. The buggy browsers will show the *actual* text in the span as though the alternate were not there.
- Put the comment alone in a pullquote span, just before the sentence you’re (sort of) quoting. Buggy browsers will not show any pullquote, but other browsers will work normally. Example:
<span class="pullquote"><!-- Darn that browser! --></span>Darn that Javascript-mangling browser!
174 Comments
Pages: « 1 2 3 4 5 6 7 8 [9] Show All
[...] EDIT: This plugin is no longer supported by the above author you can now find a new pull-quote plugin here [...]
[...] wordpress, sebenarnya sudah ada plugin kusus untuk menangani pullquote ini. plugin bisa di dapatkan di sini. Namun menurut saya, selama manual masih bisa kenapa memakai plugins kasian blog banyak plugins yg [...]
How do I put line breaks, paragraphs, lists, etc. within the pullquote? When I do this now it doesn’t work.
This is a known issue — you can’t put HTML entities inside <!– HTML Comment –>s for an alternate text. It’s on the “to fix” list, but I don’t have any kind of ETA. This also causes problems for people whose language include accented letters.
Does anyone have a list of known plugin compatibilities?
I activate Pull-Quotes and get a blank page. It seems to get stuck in the header, failing to load the rest of the site…
I’m using an external dom-tab script for some features on the site, and was wondering if there was any kind of conflict..
Any suggestions would be helpful.. so I can dig in the right place.
One thing I should add – I tried ViperBond007’s plugin and it works… so is there something I should know?
Your help would be appreciated. I’m using the 1.7 version of this.
Perry — Step one is purely on your end. Standard plugin conflict procedure:
1) Deactivate all plugins.
2) Reactivate JavaScript Pull-Quotes. Are you still having the problem?
3) if not, reactivate other plugins one by one.
4) If the problem comes back when “Plugin X” is activated, deactivate everything but Plugin X. Are you still having the problem? Reactivate each other plugin — doing JavaScript Pull-Quotes *last*.
5) If you have the problem with just JavaScript Pull-Quotes and that one other plugin, you’ve identified the conflict. Let me know what Plugin X is, so I can try to diagnose the problem.
[...] WordPress Plugin: JavaScript Pull-Quotes A plugin that allows you to easily insert pull-quotes into your posts and pages. It uses client-side JavaScript. [...]
Hi, first of all thanks for this wonderful plug-in, I have used it in the past with great success. But this time I am having some issues… could it be the theme? I am getting two pull quotes…
I thought that maybe the theme was pre-configured for pullquotes, so I disabled the plugin but left the span tag, but it disappeared completely. Only when I enable the plugin does the quote appear, doubled.
http://voxphoenicia.com/2009/03/14/drug-war-for-profit/
I can’t really think of any other reason it would do this but I did notice one other symptom. In my options screen, the alignment continues to show “left” even though the quote and generated markup are showing “right” (as they should by default).
Also, I tried changing the “blockquote” tag to a “div” tag instead, but when I try to save changes, neither setting will change. The drop-downs return to “left” and “blockquote” each time.
Am I missing something obvious?
Mikester — Go into your theme’s folder and open up the file called
header.php. Somewhere in there is a bit of code that reads:wp_head();I think you’ll find that you have it twice. Thus, all those plugins that add things to the head of your site (and you have several) are all being called twice. Most visibly, this is causing the double pull-quotes, but I wouldn’t be surprised if it were causing other problems as well.
First and foremost. Love the idea of this plugin. It’s perfect for what I need to do. I’ve got it installed and everything is working–expect for the fact that pull quotes always seem to float to the top of the paragraph–i.e. I can’t “embedd” the quotes as you are doing on this very page. Can’t understand why. Any ideas?
To clarify: picture one long paragraph with two pullquotes in span tags as specified. One will appear on the left and one on the right. In my case, BOTH will appear at the top of the paragraph (one each side) and not where they reside in the actual text (in this example, I’m including the first span after the fifth paragraph and the second towards the end).
Would greatly appreciate your help.
Cheers,
Actually, the pull-quote is added just inside the parent element, at the beginning. Thus, if the span is in a paragraph, the pull-quote is just inside the paragraph, at the beginning. check out the source of this page and you’ll see that that is the case.
In your case, you can either break it into two paragraphs, or you can manually add the pull-quote in az different location (using HTML comments).
[...] JavaScript Pull-Quotes [...]
[...] WordPress Plugin: JavaScript Pull-Quotes [...]
Pages: « 1 2 3 4 5 6 7 8 [9] Show All