Jesse J Heap & Son, Inc.

Home » wordpress Category

'wordpress' Category

The Launch of Pink Cake Box University

Sunday, January 13th, 2013

Pink Cake Box UniversityIt’s been a while since I launched a new website, and it’s amazing how fast technology has been changing over the past several years. I originally started experimenting in the web arena back in 1997 when it was standard to use the “table tag” for all your layout purposes. As the shift moved to DIV tags with floats in the CSS world, I longed for what I perceived was the simplicity of using tables to layout web pages.

Fast forward to 2012, and everything changed with my introduction to the Twitter Bootstrap framework and the Grid System concept in CSS. I wish I had found this framework earlier because it is absolutely brilliant!! For an admittingly mediocre programmer, this framework makes the web accessible again and REALLY speeds up web development. And the GRID concept is absolutely wonderful! I now have the logic of columns and rows like I had in my old “table” days but with the power and flexibility of CSS. On top of that I now have access to an extensive library of components to quickly and easily iterate upon. Big thanks to Mark Otto and Jacob Thornton who are the original developers and visionaries behind this framework.

So with the introduction to Twitter Bootstrap, I was able to use the framework in combination with WordPress and Rachel Baker’s BootstrapWP to help launch Pink Cake Box University to the world. Pink Cake Box University is an extension of Pink Cake Box with a focus on education in the cake, cookie and cupcake world. The education component of the site is centered around Anne’s new cake decorating DVDs and also includes cookie and cupcake decorating classes, various tutorials, class reviews and recipes.

The other great feature of the Bootstrap framework is the built-in responsive design component. It’s almost a no-brainer. You include the responsive design CSS stylesheet and the CSS takes care of a large majority of the work. Perhaps the hardest part for me was getting the menu to collapse appropriately for mobile devices.

For the classes section of the site, we used the Event Management plugin. This is a fantastic plugin. We’ve been using it for years and are happy to see that Marcus Sykes and team have continued to enhance the plugin tremendously. It’s now well integrated into wordpress and leverages custom post types and taxonomy for event management. We purchased the Pro version to enabled payments through paypal and some further customization options. The only issue we’ve had so far is that the booking forms do not play nice with Twitter Bootstrap responsive design approach. I haven’t done a deep dive yet, but it appears the forms have some hard coded widths in the CSS code which causes trouble on the responsive side of things.

The other interesting part of the project was integrating with for managing the purchase and fulfillment of Anne’s DVDs. I use the word integration loosely here because at this point we are simply just linking from Pink Cake Box University to our DVD listings at Amazon. What’s interesting though is the ability to leverage Amazon’s fulfillment capabilities for distributing the DVDs to customers. That’s probably the most attractive aspect of the service. We simply send them the DVDs and they manage the order and fulfillment process. With its fulfillment services, your listing can qualify for Amazon Prime and free shipping.

The downside of using Amazon is the lack of promotional capabilities. The Amazon platform has great promotional capabilities, but for some reason they restrict promotions on books and dvds. I do not know why, but it is certainly disappointing. In the end however, Amazon provided a fairly straightforward setup process and allowed us to get to market in time for the Christmas rush. Going forward, we may look at other e-commerce options, but for now Amazon is serving its purpose.

That’s all for now. For those interested, we are running a great little contest to win one of Anne’s new cake decorating DVDs. The DVDs focus on the basics of stacking, squaring-off, fondanting, and paneling round and square cakes. You can enter here.

Facebook Marketing & WordPress

Thursday, February 24th, 2011

Jeff Ente from Who’s Blogging What, wrote a post on Mashable about the new Facebook Fan Pages iframe capabilities. He was completely on mark – this is a SIGNIFICANT enhancement that has HUGE potential for marketing on Facebook.

One of the things I spoke about in Social Media Marketing for Dummies was the power of syndication within the digital space. Syndication enables small businesses to re-purpose content across multiple channels to engage users in a consistent manner without have to create entirely new content. We use WordPress as our hub for syndicating information out to various channels.

For Pink Cake Box, we have employed this strategy across many of our channels and with the introduction of iFrames for facebook fan pages we took advantage of this on our facebook fan page.

We created a facebook application that pulls content from our wordpress site and repurposes that content in a format that fits within the confines of facebooks design parameters. The page allows users to interact by leveraging our search feature and displays our most recent cakes and most popular cakes.

This enables us to create a dynamic and fresh facebook page that is automatically updated whenever our wordpress site is updated.

This is just the first step and as Jeff states, there are further opportunities to personalize the experience for facebook users. I’m very excited about this new feature and look forward to seeing more innovations in this space.

Diagnosing and Fixing Web Performance Problems

Saturday, November 13th, 2010

As Pink Cake Box has grown over the years, we’ve had to focus more time on optimizing site performance. In aggregate, we receive over 1/2 million unique visitors a month with over 2 million pageviews per month. We’ve also taken the non-traditional approach of allowing other sites to link directly to our images. In combination, all this traffic was putting a strain on our web server and was causing performance issues and web site crashes.

In conversations with our web hosting provider they claimed our traffic was in the top .01% of sites they host and the implementation of our web server was not optimized to handle such a load. They suggested we take a look at NGINX which is a lighter and faster web server as compared to Apache. (Check out this web server comparison they did)

We decided to take a different route and ended up implementing three options which appeared to have helped:

1) Optimized Xcache values
2) Implemented a content delivery netowork for static assets using Amazon Cloudfront
3) Optimized wordpress plugins/queries

Here are some details for others who may be having similar issues:

Optimizing xCache

Our web hosting provider offers Xcache for caching php pages, but the default values were not doing the job. After reading through this excellent xcache post from Chris Meisinger, I started testing a variety of different values for the slot and cache sizes (xcache.size & xcache.slots) and finally settled on optimal sizes that worked best with our site.

I used apache benchmark tool to help test different configuration options:

ab -n 1000 -c 20

Implementing Amazon Cloudfront

Setting up Amazon cloudfront was a breeze. Dreamhost holds your hand through the process and the only work I really had to do was update our wordpress database and any HTML files to point to our new

We noticed a TREMENDOUS performance boost from this approach and it also helped ease the burden on Apache.

Note there are plenty of plugins to help ease the process of integrating Amazon Cloudfront/S3 with WordPress. I personally did not try any of them.

Optimized wordpress plugins/queries

Last but not least I spent time tuning some of my existing plugins and identified some troublesome bottlenecks in third-party plugins. I used this excellent plugin from Frank Bültge which lists all your wordpress queries with timings.

As a result of this exercise I was able to tune my search tags plugin as documented here.

The other bottleneck I had was with Version of SexyBookmarks. It was adding 5 seconds of load time to my main blog page. I did NOT investigate if these performance issues were specific to the plugin itself or perhaps a conflict the Sexy Boomarks plugin and another plugin on the site.

All I know is that as soon as I disabled the plugin my wordpress load time decreased by 5 seconds. The folks at do a great job maintaining this plugin so I’m more apt to believe it was some issue specific with our wordpress site (which is highly customized so I wouldn’t be surprised).

How to integrate WordPress Search with your Facebook Application

Saturday, July 10th, 2010

So a few weeks ago we released a facebook book application called Pink Cake Box Guiltless Treats for sending cakes to your facebook friends. We’ve since expanded the application to integrate with wordpress search.

Our facebook app now has access to over 1200+ cakes and is automatically updated whenever we post new cakes. I’m proud to say that I believe this is the largest library of cakes available via any facebook application.

So I want to talk a little bit about how we integrated the wordpress search function. There are a few ways to do this, and the two options I considered were:

1. Integrate directly to wordpress default search using the ?s parameter
2. Create a custom search query

Ultimately I choose option 2 so I could create a search results template file in my wordpress theme that was separate from our default search results template. The new search results template file (which is pictured below) was customized to fit the look and feel of the facebook application:

So here are the steps I took to integrate wordpress search with my facebook application:

Step 1) Created a new search results template file that took in a GET parameter as a search term. The search results template uses the GET parameter as input into a custom query to search tags and the post content. Finally it returns the results and formats to match the look and feel of the facebook application.

Here’s the section of code that takes the GET Parameter and runs the custom search query:

if (isset($_GET[‘se’]))
   $search_term = esc_html($_GET[‘se’]);

$total = "SELECT  wp_posts.*
FROM wp_posts  
LEFT JOIN (select distinct tr.object_id, from wp_term_relationships tr inner join wp_term_taxonomy tt on tt.term_taxonomy_id = tr.term_taxonomy_id
inner join wp_terms t on t.term_id = tt.term_id where tt.taxonomy=’post_tag’) tr on wp_posts.ID = tr.object_id  
INNER JOIN (select distinct tr.object_id from wp_term_relationships tr inner join wp_term_taxonomy tt on tt.term_taxonomy_id = tr.term_taxonomy_id
where tt.taxonomy=’category’ and tt.term_id in (2,3,5,7,8,11)) tr2 on wp_posts.ID = tr2.object_id  
WHERE 1=1  
AND (((wp_posts.post_title LIKE ‘%"
. $search_term . "%’) OR (wp_posts.post_content LIKE ‘%" . $search_term ."%’)))  AND wp_posts.post_type != ‘revision’
AND (wp_posts.post_status = ‘publish’) OR ( like ‘%"
. $search_term . "%’ AND post_status = ‘publish’)
GROUP BY wp_posts.ID ORDER BY wp_posts.post_date"


These results are returned and looped through to produce the search results output. I use the meta data tags embedded in our posts to pull the appropriate cake thumbnail. This query also restricts itself to only searching categories related to cookies, cakes and cupcakes and not other general categories that do not have cake related photos.

Step 2) Once the wordpress template was all setup, I modified our Facebook canvas page to add a search box which posts to the new search results template page:

<h1 class="headings">Search for a Cake</h1>
<form method="get" id="searchform" action="">
      <input type="text" value="" name="se" id="se" />
      <input class="btn" type="submit" id="searchsubmit" value="Find It" />
    <h1>OR  </h1>

Here’s a photo of how it looks:

Step 3) The last piece of integration is ensuring the new search results template can interface back with the facebook application once the user has chosen the cake they want to send to their friends. So there is one more post from the search results template back to the facebook application page that handles the next step of allowing the user to choose the friend they want to send the cake too:

 <form action = "" id="SendForm" onsubmit="return verify(this);" method="POST">
          <input type="submit" value="Send this cake" />
          <input type="hidden" value="" name="image_selector" id="image_selector"/>
          <input type="hidden" value="" name="image_title" id="image_title"/>
          <input type="hidden" value="" name="post_url" id="post_url"/>
          <input type="hidden" name="friend_selector_id" id="friend_selector_id" value="" />

Here is the overall workflow for further clarity:

Send a cake via Facebook

Saturday, June 12th, 2010

I’m happy to introduce my newest project – a facebook application for sending cakes/cupcakes to your facebook friends.

What’s cool about this application is the tight integration with wordpress that enabled me to to expand it to almost our entire portfolio of online cakes. I was able to tie the facebook API with the wordpress API which allowed me to tap into the existing cakes posted in our online cake galleries. The application is setup so that it can pull based on any wordpress tag or category. So anytime a new cake is posted it automatically shows up in the facebook application.

This application illustrates the power and advantage of the structured wordpress environment and its ability to re-purpose content across multiple channels.

Here is a screenshot of the application landing page for sweet 16 cakes:

Here’s a screenshot of what it looks like when a friend receives one of our cakes:

Also, the application helps drive traffic and links to our site since each time you send a cake via facebook it includes a link back to the wordpress blog post about the cake. This approach aligns with advice from Matt Cutts who has always talked about providing “useful services” to help attract high quality links and traffic.

SweetTweet – Send a cake via Twitter

Tuesday, May 19th, 2009

Twitter Cake
Today we released a new Twitter application on Pink Cake Box’s wedding blog.

The application is called SweetTweet and lets you send birthday cakes and cupcakes via Twitter.

With a lot help from a fantastic photo slider tutorial from Jesse Janzer, we created a slick photo viewer to allow users to easily select a cake to send via Twitter. Jesse put together a great tutorial and his wife is a fantastic wedding photographer in Utah.

We also need to thank Aravind Ajith from the Design Superhero for his free twitter bird icons. My design skills are poor at best and his twitter bird icon helped add some level of graphical sophistication to the application.

You can try SweetTweet for yourself here.

WP-PHPList – adding additional fields

Wednesday, April 22nd, 2009

Ron has put together a code example explaining how to add additional fields to the PHPList plugin. Thanks Ron!

WordPress 2.7 Upgrade

Sunday, December 14th, 2008

Upgraded our Wedding Cake blog over the weekend to wordpress 2.7. This is by far one of the best upgrades I’ve gone through with the product. The new interface is fantastic – kudos to the interface development lead Jane Wells for taking the interface to the next level. After a few minutes in the new sleek interface I don’t know how I ever managed in the old klunky 2.6 interface.

The comment threading functionality is also a neat feature. It requires from theme modifications – but fortunately not to heavily involved.

Congratulations to the entire wordpress development team. Great job!

Great wordpress plugin resource

Saturday, August 16th, 2008

I have a great appreciation for wordpress plugin developers. Having released a few simple plugins myself, I understand the time it takes to develop and test a quality plugin. On top of that, devoting time to support the plugin and keep it up-to-date as wordpress rapidly evolves is another effort in itself.

That’s why I appreciate the plugins Joost de Valk has been churning out.

Just recently I setup his Search Suggest plugin on our cake blog. This plugin offers a clever way to mimic some of the useful spelling suggest features offered by major search engines.

This is especially important on our cake blog. Using search meter, we’ve found that many people are searching for cakes using common misspellings. And while we’ve developed a plugin to correct common mispellings, this tactic doesn’t scale well as it requires us to hardcode common misspellings.

Joost’s plugin allows us to cover a wider array of mispellings. A good addition to this plugin would be a feature to allow wordpress admins the ability to add overrides for commonly misspelled words. This would be useful because the Yahoo API doesn’t work as well for word combinations. For example, the API will catch the misspelling for Haloween, but does not catch misspelling for “Haloween Cake“.

I suggest wordpress admins check out Joost’s complete lists of plugins.

Upgrade to WordPress 2.6.1

Saturday, August 16th, 2008

I’ve been delaying the upgrade of our wedding cake blog to 2.6 because I wasn’t thrilled with the post revision option. However, there is an easy way to turn it off without having to edit any configuration files.

With this plugin, I can also turn off the autosave feature which often leads to multiple drafts of posts which I end up having to spend time deleting.

Once I had the plugin installed, the upgrade to WP 2.6.1 was smooth. I tested the upgrade first on our test blog and found no issues and then deployed it on our main site without any hitches.

Kudos the the wordpress team for another smooth upgrade.