1451 posts
  • Has referred 200+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Member of the Envato Team
+12 more
kailoon Envato team says

1) You can check your theme files using a theme check plugin – http://wordpress.org/extend/plugins/theme-check/

2) Make sure you are using the right way to enqueue external scripts.

3) Make sure you include the basic wp hook within your theme.

4) Do not use php short tags.

5) Before any release you should turn on WP_DEBUG in wp-config.php to fix PHP errors and to see deprecated function calls .

6) Load external scripts ONLY when needed for a page template.

If you have any other tips would like to share with us, feel free to drop me an email and I will add it here. There are so many can be included here but above are those I think is important.

47 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
nahid29 says

Wow this is cool.. Gonna try it now!

4389 posts ThemeForest Reviewer
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Member of the Envato Team
+12 more
Ivor Envato team says

Another tip: Before any release you should turn on WP_DEBUG in wp-config.php to fix PHP errors and to see deprecated function calls .

1451 posts
  • Has referred 200+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Member of the Envato Team
+12 more
kailoon Envato team says

Ah, no, you don’t have to turn on wp_debug, that’s for php checking. So, its optional.

Normally, that will only return bunches of php ‘notice’ which is not important.

EDIT : Now, you will need to turn on the wp_debug to test run your theme. Make sure there is no warnings, notices or errors appear.

1029 posts
  • Has referred 500+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 more
ThemeBlvd says

Ah, no, you don’t have to turn on wp_debug, that’s for php checking. So, its optional. Normally, that will only return bunches of php ‘notice’ which is not important.

If you’re ever bored, it’s a fun game to play… Turn on wp_debug on one of your old WP themes, and see if you can bob all the notices on the head.

3503 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more
sevenspark Moderator says

For compatibility purposes I think a tip on using jQuery, either with a noConflict() declaration or else only using the $ variable within a closure would be very helpful. i.e. jQuery should either be done like this:

$j = jQuery.noConflict();
$j('#mydiv').awesomeTrick();

or

(function($) { 
    //code goes here
})(jQuery);

or

jQuery(document).ready(function($){
    //code goes here
});

More info: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers

I’ve been supporting my WordPress plugin and it’s amazing how many themes don’t use wp_enqueue_script, load their own jQuery libraries and don’t use noConflict, etc. These themes don’t play nicely with others :(

Standards are good! :) Thanks for starting this thread, Kailoon!

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

Being more of a buyer than a WP theme author, I would also add something from this point of view.

When naming your classes/ids, try to give them a unique name.

Example: if you’re using a jQuery tabs plugin, don’t just name your <ul class="tabs" />

I’ve had this recently and it interfered with a plugin that was using the same naming (=> plugin broken, theme broken)

I guess this would apply to more situations….

Also, please always properly name and document your functions – some of us like to dig in the code and it’ll help us understand it faster.

Thanks Kailoon for the topic :)

1383 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

Ah, no, you don’t have to turn on wp_debug, that’s for php checking. So, its optional. Normally, that will only return bunches of php ‘notice’ which is not important.

Actually deprecated functions are also shown when WP_DEBUG is on.

And my suggestions is not to turn it on when you’re done, but when you start developing, so you don’t have to clean up a mess at the end.

And + you improve your PHP skills.

7 posts
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
  • Helped several times protecting Envato Market against copyright violations
DenB says

Thanks Kailoon for the tips…

3503 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more
sevenspark Moderator says

That’s another good point from @digitalimpact – namespacing in general – both CSS classes and functions. You don’t want collisions with plugins, etc.

Namespacing in shortcodes is another question. I think usually it is a good idea but it does render those tags useless if a user switches themes. Still I think the first objective is to write the best code for users that are currently using your themes. For example, if a plugin uses the [tabs] shortcode and so does my theme, one of those will be overwritten. Safer to use [namespace-tabs] in my opinion.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by