Curly Quotes In WordPress Shortcodes

WordPress blog posts likes to use curly quotes instead of straight quotes whenever you write an article.     Our documentation site is built on WordPress which means many of our articles are replaced any quotes we type in an article with curly quotes.

The problem is that the WordPress shortcode processor does NOT like curly quotes.   If you use curly quotes in a shortcode attribute such as [slp_directory by=”city”] and those quotes are “curly”, WordPress treats the quotes as a plain-old alphabetic character just like the C-I-T or Y in “city”.   In other words WordPress things you mean “by quote-city-quote” not “by city”.

Why is that an issue?

If you copy-and-paste most examples from this documentation site WordPress will copy the “pretty curly quotes” into your shortcode.     If you paste that into your WordPress page it breaks.

Straight versus curly quotes when pasted into a page.

An example of how this can impact Store Locator Plus can be seen from my example where I pasted the slp_directory shortcode directly from the docs site into my test site.    I get an invalid data query because WordPress added curly-quotes to my data field name.    The SLP database does not have a field name quotesl_storequote but does have a field named sl_store.

The fix?

Make sure you re-type each quote manually.  Typing the ” in your blog instead of copy-and-paste will ensure you are getting “straight quotes” in your shortcode attributes not curly quotes.

This is how the example looks now that the curly quotes have been replaced with straight quotes.

WordPress White Screen

The “White Screen” in WordPress is one way that a WordPress site will show bugs in the underlying PHP code or system configuration.   In geek-speak this is known as a fatal error.    It can be a bug in PHP code or an incompatibility between the code and the server configuration.

The most common cause is a bug in the PHP code itself.  Plugins, themes, and WordPress can be the source of the problem.    If you have upgraded more than one item on your site prior to noticing a white screen, any of the updated items is suspect.

Note: You should ALWAYS back-up your site before upgrading to new versions of WP or any plugins. We suggest using JetPack . BAck-up your Word Press site

Here are some ways to track down the source of a “white screen” and recover from it quickly.
Continue reading “WordPress White Screen”

Debugging With Debug Log

With WordPress it is very easy to debug the activation process of a plugin and get a detailed log file of exactly what is going on.

Often there are hidden warnings or errors. Sometimes they are generated by the plugin. Many times they are generated by OTHER plugins or your custom WordPress theme. The first stage of debugging is to turn on the built-in WordPress debugging messages and debug log.
Continue reading “Debugging With Debug Log”