ClassiPress 3.2 – Child Themes Checklist

ClassiPress 3.2 is on the way and with it comes many changes, new features, bug fixes and improvements. Some of these changes may significantly affect child themes. This tutorial will discuss the most significant changes and show you how to resolve possible conflicts.

Wrappers

This minor change can have a big impact on your ClassiPress install. It’s almost sure to break any child theme. The good news is that a small amount of work will fix any problems you might have. We already implemented wrappers in our other products and we wrote a separate tutorial introducing wrapper.php. We strongly recommend reading that before you proceed with this tutorial.

After reading that tutorial and completing associated tasks, you will also want to make sure you do the following…

  • If your child theme overrides any template files, you will need to remove get_header(), get_footer() from all child theme files.
  • If your child theme overrides one of the tpl-*.php files, you will probably need to apply your changes again on fresh files, as lot of code from these files has been replaced by template classes.
  • If your child theme modifies header or footer code you will need to update it as some parts of the header and footer files were moved into the wrapper.php file.

“rel” attributes

In HTML5, which ClassiPress 3.2 now uses, you can pass information to JavaScript by defining data-* attributes. Older versions of ClassiPress used the ‘rel’ attribute for this, which is now incorrect. We mention this change because some functions which contain this attribute are often overridden with child themes, like cp_ad_featured_thumbnail()

All you need to do is change ‘rel’ to ‘data-rel’.

Functions

In an effort to let you modify ClassiPress to fit your needs, we allow you to override some functions by wrapping them with function_exists(). One of the functions changed in ClassiPress 3.2 is cp_formbuilder(). If you override this function in your child theme, you may need to make changes to avoid any problems.

Testing & Debugging

Ensure that your child theme is properly tested before using it on a production site. While you are developing it is recommended to have the WordPress Debug mode turned on. This allows you to see and fix any PHP errors, notices, and/or warnings. To enable debug mode, enter the following constant declaration in your wp-config.php file.

define('WP_DEBUG', true);

We also recommend installing a couple of useful developer plugins (written and used by WordPress core contributors) to aide in debugging and optimization.

  • Debug Bar – Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
  • Debug Bar Console – Adds a PHP/MySQL console to the debug bar. Requires the debug bar plugin.
  • Log Deprecated Notices – Logs the usage of deprecated files, functions, and function arguments then offers the alternative if available and identifies where the deprecated functionality is being used. you’ll also need to add these constant declarations in your wp-config.php file for them to work properly.

After installing the plugins mentioned above, you will see a new button in the top right corner of your admin bar called “Debug”.

You can download the latest development version of ClassiPress (available from your customer dashboard) and test your child theme accordingly. We strongly recommend doing this sooner rather than later so your customers get a heads up once we roll out the update.

Like this tutorial? Subscribe and get the latest tutorials delivered straight to your inbox or feed reader.

Your rating: none
Rating: 4.6 - 12 votes

Popular Add-ons

Post An Ad WOW

Make post an ad form attractive with background image for each category.


(2)
$19

Banners Galore ClassiPress

Enables many new banner ad spaces throughout ClassiPress.


(14)
$19

Order Exporter

Export your order details to a CSV file. Fully customizable and works with…


(1)
$19