General Best Practices

Rule #1

Use Genesis coding conventions (these are basically WordPress coding standards) when writing code (no PHP shortcode, properly indented, spaces within brackets and around args, etc). Comment code where necessary.

Rule #2

WordPress compatibility must be as per the current Genesis version.

Rule #3

PHP compatibility must be as per current WordPress requirements. If you really, really must use some PHP latest funky function, make sure it fails gracefully on “lesser” servers.

Rule #4

When writing custom functions to replace existing Genesis functions, respect the structure and content of the underlying function. Eg, if an existing function provides a filter on the output, the replacement function should do the same.

Rule #5

Re-use Genesis functions rather than writing your own. (Eg image functions – Genesis has many built-in helper functions for grabbing and displaying featured images, for example.)

Rule #6

Function naming: include the childthemename in the function name. For example, if replacing genesis_do_post_title with your own function, name it childthemename_do_post_title. Same applies to custom filter functions.

Rule #7

Use function_exists for conditional loading of a third party (ie: external plugin) function. Not required for Genesis or child theme-defined functions.

Rule #8

Don’t load jQuery framework (or any other framework shipped with WordPress) from external sources without using wp_deregister_script to deregister the built-in version and wp_register_script to register the new one, etc.

WordPress SEO