Skip to content

adamdehaven/perfect-pullquotes

Repository files navigation

Perfect Pullquotes

WordPress rating WordPress WordPress WordPress plugin license

A Wordpress plugin to add beautifully styled left-aligned, right-aligned, or full-width pullquotes. Includes a custom 'Pullquote' menu button for the TinyMCE Editor as well as a custom shortcode. View the always-current info post on adamdehaven.com

INSTALLATION

Download the plugin. To change the default color of the pullquote’s border, edit lines 71, 79, and 87 of the perfect-pullquotes.css file by changing the HEX value of the border-color attribute. Alternatively, once the plugin is installed, you may utilize the “color” option included within the shortcode (details below). Upload the compressed perfect-pullquotes.zip plugin file via your Wordpress Dashboard.

Plugins > Add New > Upload Plugin

Once installed, the plugin will add a Pullquote dropdown button to the Visual Editor (as seen below) within your Wordpress installation as well as enable the [perfectpullquote] shortcode. The actual positioning of the button in your installation may vary.

Visual Editor preview with Pullquote buttons

SHORTCODE

The plugin enables a Wordpress shortcode that allows you to add a pullquote within your content. The shortcode can be added manually or by selecting text in the text editor and then selecting an option (left, right, or full) from the Pullquote dropdown button.

The default shortcode tag is shown here

[perfectpullquote align="left" bordertop="" cite="" link="" color="" class="" size=""]This is the pullquote text.[/perfectpullquote]

OPTIONS

The shortcode includes six options, as outlined below.

Option Accepts Description Example
align left right full Determines whether pullquote is left-aligned, right-aligned, or full-width (95% width of container). Required [perfectpullquote align="left"]This is the text.[/perfectpullquote]
bordertop true Move the border location above the pullquote. On mobile, falls back to the align corresponding location. Optional [perfectpullquote align="right" bordertop="true"]This is the text.[/perfectpullquote]
cite text Cite your quotes back to their author/source. Optional [perfectpullquote align="right" cite="Jane Doe"]This is the text.[/perfectpullquote]
link URL Turn the cited author's name into a link that opens in a new window. Must be a valid URL beginning with http or https. Optional [perfectpullquote align="right" cite="Jane Doe" link="http://example.com"]This is the text.[/perfectpullquote]
color HEX color code Change the default border-color attribute by entering a valid HEX color, including the # [perfectpullquote align="left" color="#16989D"]This is the text.[/perfectpullquote]
class text Add class(es) to pullquote container. Optional [perfectpullquote align="right" class="cited author-quote"]This is the text.[/perfectpullquote]
size integer Change the size, in pixels, of the pullquote's text. Optional [perfectpullquote align="right" size="32"]This is the text.[/perfectpullquote]

FAQ

Are all of the shortcode option attributes required?

No. Only the align option attribute is required. All other attributes may be deleted if unsued. For example:

[perfectpullquote align="left"]Text[/perfectpullquote]

How can I change the color of the pullquote's border?

To change the default color of the pullquote’s border, before uploading the plugin, edit lines 71, 79, and 87 of the perfect-pullquotes.css file by changing the HEX value of the border-color attribute. Alternatively, once the plugin is installed, you may utilize the “color” option included within the shortcode.


How can I add additional classes to the pullquote's container?

Simply utilize the "class" option on the shortcode tag.

[perfectpullquote align="left" class="firstClass secondClass"]Text[/perfectpullquote]

How can I change the font size of the text?

Simply utilize the "size" option on the shortcode tag by entering the one or two-digit size, in pixels.

[perfectpullquote align="left" size="32"]Text[/perfectpullquote]

How can I add a cite to the quote?

Simply utilize the "cite" option on the shortcode tag.

[perfectpullquote align="left" cite="Author Name"]Text[/perfectpullquote]

Can I link to the cited author's website, online works, etc.?

Simply utilize the "cite" and "link" options on the shortcode tag. Both options must be present in order to generate a working link.

[perfectpullquote align="left" cite="Author Name" link="http://example.com"]Text[/perfectpullquote]

I updated the plugin, but now my pullquotes look weird. Help?

After updating the plugin, you may see "ugly" pullquotes until you clear the cache in your browser and load the new CSS files from the plugin. Server cache time may vary. If the pullquotes continue to look "broken," simply clear your web brower's cache and refresh the page.

EXAMPLES

Below are a series of paragraphs (filler text) with pullquotes inserted:

Sample pullquotes

About

A WordPress plugin to add beautifully styled left-aligned, right-aligned, or full-width pullquotes. Also includes two custom buttons for the TinyMCE Editor as well as a custom shortcode.

Topics

Resources

License

Stars

Watchers

Forks