WordPress Theme Coding – Modify WordPress Themes and Make them distinctive!

Almost everybody who fits their own WordPress theme would at least want to modify the header. The most excellent thing to buy premium themes is that they always come with the user support and files and forums to make customization and installation simple for you.

Other things to customize:

Sidebar – A lot of people will wish to remove ‘Meta’ information which is included to WordPress by default. You might even want to include an email opt-in as well as RSS Feed information to your sidebar. The simplest way to make the changes to sidebars is to get the themes that are ‘widget’ prepared. Widget ready themes permit you to simply add as well as remove widgets to your theme devoid of knowing custom or special coding.

Background Color – If you identify some HTML, background color is rather simple to edit. In WordPress locate your Style sheet and background color coding is generally very close to top of style sheet. Yet again, this is much easier if you select a WordPress theme with diverse color alternatives. There are a lot of themes that now proffer different color alternatives. This would signify that you do not require making any coding alterations yourself.

Footer – You will want to make certain to include your patent to footer of any website or blog you generate with WordPress. You could even go to the Copyscape website as well as take a graphic which shows your website is protected by exclusive rights. To change the footer you would require going in your themes source files. These are found in the Appearance section however this time you would have to click ‘Editor’. Add the company information and privacy policy links in footer section is a great idea. Select a free theme you must seriously reflect on using a best WordPress theme.

While selecting a theme look at what alternatives it has obtainable. This would make doing the customization easier while you come to it. Following are a few details you must decide if you need in your web site design:

* Does theme proffer drop-down menus?

* Does the theme provide you the alternative to list the categories in top navigation bar?

* How many columns are there and how many do you wish for?

* Do you like typography (font, font color, font size)?

* Typically videos, images, and slide shows you observe in example themes are not included. Thus, if you want a similar feel and look, you will have to include your own videos, images and slide shows. Estimate the theme details to learn how easy it is to add the images, video or slide shows.

* Automated thumbnail sizing is an extremely good feature if you are fond of plenty of images in your blog. A lot of premium themes proffer auto-size thumbnail administration. If you find a perfect theme in all other values, do not make automated thumbnail sizing the deal-breaker.

WordPress Truncation call is causing php4 errors

My latest WordPress theme, DynamicColor has been doing rather well as far as the downloads go. I was suprised to here that several people were having some trouble with this theme. It seems that they are still running php4. I have been working rather hard to master Classes within php. Therefore, I have been using classes when ever possible. Turns out these classes are causing their errors.

I built a truncating class that I like more then the WordPress default get_excerpt(). Ive never been happy having to add more tags to a post. Therefor in all my themes I ad some form of truncation. My latest solution has been the class found below.

class truncate{
/* Public function for truncating content
*  Requires an string and a length
* Structure:
* $truncateString = ‘text ro truncate’
* Example:
*    $truncateString = truncate::doTruncate($_POST[‘truncate’], 100);
* Returns:
* return truncated string;

public static function doTruncate($truncateString, $limit, $break=”.”, $pad=”…”) {

// return with no change if string is shorter than $limit
if(strlen($truncateString) <= $limit) return $truncateString;

// is $break present between $limit and the end of the string?
if(false !== ($breakpoint = strpos($truncateString, $break, $limit))) {

if($breakpoint < strlen($truncateString) – 1) {

$truncateString = substr($truncateString, 0, $breakpoint) . $pad;


return $truncateString;



With this class I am able to use:

<?php $permalink = ‘ <a href=”‘.get_permalink().'”>Read More…</a>’;  ?>
<?php $truncateContent = truncate::doTruncate(strip_tags(get_the_content(), ”), 300, ‘.’, $permalink); ?>
<p><?php echo $truncateContent; ?></p>

Instead of using the typical the_excerpt() or the the_content. I can specify the amount of truncation as well as what I want character I want to stop the truncation at. The example above truncates on a period.

If you are building a WordPress theme and are looking for a better way to truncate the content, feel free to use this class. Clearly, I would love a link back to this article if you do end up using it. But consider yourself warned, there are a few people still using php4 and they will get an error.

If you would like to see the them you can check it out at: WordPress.GordonFrench.com