Em3 Pullquotes

Adds a couple of faux HTML tags to your repertoire- <pl> … </pl> and <pr> … </pr> - to allow you to have pullquotes aligned to the left or right in your posts (as for this one).

This is a right-aligned pullquote

Once again it’s all based on a neat effect I found in the archives at Mandarin Design.

The Variables
N/A.
 
The Code

This is a left-aligned pullquote.

View it as a text file so you can read it first - save this as em3_pullquotes.php and upload it to your wp-content/plugins folder.
 
The Notes
You can change the way your quotes appear to suit your own preferences. It’s easy, honest. The key lines in the plugin are those between
function em3_pullquote_link($quote,$align) {
and
return $output;

What these tell the script to do is (a) identify whether or not it’s a left- or right- aligned pullquote and set $marge to the opposite (because if it’s left-aligned you’ll want a margin on the right and vice versa and (b) format the pullquote.

If you want your quote text to align the same way as your pullquote, change the text-align:center; to text-align:$align;.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

If, however, you want your quote text to align the opposite way to your pullquote, like this, change the text-align:center; to text-align:$marge;.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 
The Instructions
To use the plugin, save the text file in wp-content/plugins as em3_pullquotes.php (making sure that’s a 3 not a ³), activate it and use the code <pl> … </pl> around the quote you want “pulled” left or <pr> … </pr> around the quote you want “pulled” to the right.

Leave a Reply