352 posts
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
+1 more
danharper says

When displaying posts in your WordPress theme, you usually have the same chunk of code in multiple places throughout your theme, and it usually never changes.
For example, you typically have the same code in index.php, archive.php, search.php etc. and even the single.php page contains very similar code.

That doesn’t make any sense at all. A better approach is to include that code in one file, and reference that file in index, archive, search, single etc.: Don’t Repeat Yourself (DRY).

I show how to do this in this screencast for the new Nettuts Screencast Competition

:)

1179 posts
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 6-7 years
mabuc says

Nice idea Dan, This is very useful I will try this on my latest theme.. Thank you for sharing and Good Luck on the competition. :)

1315 posts
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a Free File of the Month
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
+1 more
fuelthemes says

Are there any cons performance wise?

352 posts
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
+1 more
danharper says
Are there any cons performance wise?

Nope :)

by
by
by
by
by
by