Categories of DerekJ Theme not working?

Categorized Under: General No Commented

I am using WordPress since last 9 or 10 months. And still I am an amateur :) searching for various features in and around this, and always looking for better themes also. Some of my favourite are: Architectural Digest, Arras ThemeBig City, Chucky, Cloudy,deMar, ElZine, EpsilonEstherHopeLightWordWitcher WorldWP-Andreas01 etc.

Yesterday, I found and implemented the DerekJ Theme for my site. While implementing this theme, I just checked the looks.

Later on, I wanted to go thru some features and so, started searching Plug-ins. This search of Plug-ins is, however, not the first time. I installed Askimet, 2 or 3 months back, and tried to activate it, and there I stuck. I was asked API :( . I did as per instructions and registered to the WordPress and searched for API there. Poor me, I came to know that that API was sent in my email yesterday, after almost 2 months or more of installing Askimet :). I found some useful Plug-ins and installed and activated them, to make what it is now.

Today, when I was playing with all these Plug-ins, and checking my posts against the results, I noticed something unusual. The theme I used is somewhat incomplete!! When I clicked on the categories, I was moved to the home page!!!

Searching for proper resolutions, I visit DerekJ website again, and find that most of the responses have the same problem. A response from Francis is quite helpful. But his suggestion is one that takes time to you to correct the problems. Following his suggestion, I compared all the scripts, mainly those from “includes” directory and functions.php. I found that everything will be okay if you change the “template-options.php” in “includes” directory.

I am publishing the same here.

Please add the following after $codename=’DerekJ’; in the “template-options.php” file:

/// Code start

function another_get_categories() {
global $wpdb;
$sql = ‘SELECT t.name FROM ‘.$wpdb->prefix.’terms as t, ‘.$wpdb->prefix.’term_taxonomy
as tt WHERE t.term_id = tt.term_id AND tt.taxonomy = \’category\”;
$result = $wpdb->get_results($sql);
return $result;
}

/// Code end

And change the line:

$getCategories = get_categories(’hide_empty=0?);

to

//changed line begin

$getCategories = another_get_categories();

//changed line end

I think this helped you guys who are using DerekJ. I would like to encourage to use DerekJ if you are hesitated just because of “categories” not working.

Thanks to misbah for writing the codes, and Francis to give a hint. I just rearranged his works for this.

Enjoy using DerekJ.

Leave a Reply

You must be logged in to post a comment.