All posts by karen


Markdown LogoToday I chanced across a fabulous thing… Markdown! I came across it looking for a way to easily switch in and out of code blocks without installing a heavy plugin which also does syntax highlighting, etc. After reading an article by Chris Coyier I attempted to give it a try. Eventually I decided that installing JetPack Markdown was the way forward.

You can hit the ground running with this Markdown Quick Reference. While using Jetpack Markdown, I quickly realised that no matter what I was doing, it didn’t decode quotes in fenced code blocks luckily someone else worked out how to fix that!

Professional WordPress Design and Development

Front cover of the book 'Professional WordPress'

Professional WordPress, Design and Development 2nd Edition : Brad Williams, David Damstra, Hal Stern; Wrox Programmer to Programmer, John Wiley & Sons, Canada, 2013, ISBN 978-1-118-44227-2

Working through this book chapter by chapter and making comments as I go. Starting with a completely ‘out the box’ installation, the plan is to implement all the tips and code in this book on this site and then take notes in this blog. My first impression is that this book is perfect for someone trying to pick up little gems. It is not the basics, and very quickly goes into detail, moving at a nice fast pace.

Chapter 1

A typical getting started section which introduces WordPress, how it started, how to host it, how to install it, writing your first post… anyone with any experience could happily skim this chapter.

Chapter 2

Once you’ve downloaded the latest release, take a look at the directory and file structure… Core files are contained in the wp-includes and wp-admin directories, wp-content contains customised files. Generally you should never modify core files for all the usual reasons.


I found this particularly interesting as the advanced options are not usually covered in such detail. There are quite a few tips here that one could revisit later.
– You could, for security reasons move this file out of the WordPress directory and into the parent directory. WordPress looks for the file first in the WordPress root directory, then automatically in the parent directory if it doesn’t find it.
– Some options are stored as constants in WordPress, these are defined as follows: define( 'OPTION_NAME', 'value' ); for example: define('WP_DEBUG', false);
– To set secret keys go to
– Temporary development URL? set WP_SITEURL and WP_HOME
– Limit or disable post revisions – define( 'WP_POST_REVISIONS', false ); or define( 'WP_POST_REVISIONS', 5 );
– great debugging option is SAVEQUERIES, this saves all database queries into a global array that can be displayed on your page, great help when debugging :
define ( 'SAVEQUERIES', true );
To display the query in your theme add the following to any theme template file to view (note only if the logged in user has the ability to manage options:

if ( current_user_can( 'manage_options' ) ) {
  global $wpdb;
  print_r( $wpdb -> queries );
  • Enable logging
    • create a php_error.log file in your root WordPress directory
    • turn on log errors and point to your logging file:
    • this will also log any errors produced when turning on WP_DEBUG
@ini_set( 'log_errors';, 'On'; );
@ini_set( 'display_errors', 'Off')';
@ini_set('error_log', '//public_html/cms/php_error.log' );