Blog Fix: HemingwayEX and WordPress 2.3

Last night I upgraded to the latest version of WordPress 2.3. See my previous posts (here and here) for more information. However during the upgrade process, I found an incompatibility with the new Category and Tagging functions and the theme I was using (HemingwayEX). On my homepage, I was getting the following error:

WordPress database error: [Table ‘weblog_td.wp_categories’ doesn’t exist]
SELECT cat_ID FROM wp_categories WHERE cat_name=’Asides’

This error was also appearing when using the HemingwayEX Asides module in my Sidebar. Luckily I had a local copy of my blog running on my laptop and I was able to figure out the differences between the two databases and the tables and fields therein. So, I have posted my results for the benefit of those users who have HemingwayEX as their theme.

In order to fix the code to make things work, this is all that you need to do:

  1. Find, (Download), Open and Edit the “functions.php” file which resides in the “HemingwayEX” folder in the “themes” folder
  2. Locate line 133 (or somewhere near that) that reads:

    return $wpdb->get_var(“SELECT cat_ID FROM ” . $wpdb->categories . ” WHERE cat_name='” . $hemingwayEx_options[‘asides_category’] . “‘”);

  3. Change that line to read as follows (and note, I commented out the old line so that I could always roll it back; you can comment it out by adding two forward slashes “//”):

    return $wpdb->get_var(“SELECT term_ID FROM ” . $wpdb->terms . ” WHERE name='” . $hemingwayEx_options[‘asides_category’] . “‘”);

    Note: you may need to change the quotation marks if you cut and paste from this entry. Simplly highlight the quote marks and enter them again using your keyboard.

    • The database items that changed are (pre-2.3 –> post 2.3):
      • cat_ID –> term_ID
      • categories –> terms
      • cat_name –> name
  4. Save your changes to the “functions.php” file and save to your blog theme directory. That’s it!

This worked fine for me (so far). The error disappeared from my homepage and my HemingwayEX Asides Sidebar module started working properly again. Hope this works for you!

HTD Says: “Hack” your functions.php page to make the HemingwayEX theme and WordPress 2.3 work in synergy!

- Advertisement -
- Advertisement -
- Advertisement -

34 Responses

  1. I have the same problem but when I tried your fix, I got a Parse Error, that seems to be because when I installed the Theme (which I really love) I deleted the Slidebar function out of the index.php (not being the best coder, so perhaps I did it a little sloppy from a coders point of view) because I wanted the pure posts to qppear on top of the page and nothing else.

    If you have any suggestions… that would really be appreciated!

  2. I have the same problem but when I tried your fix, I got a Parse Error, that seems to be because when I installed the Theme (which I really love) I deleted the Slidebar function out of the index.php (not being the best coder, so perhaps I did it a little sloppy from a coders point of view) because I wanted the pure posts to qppear on top of the page and nothing else.

    If you have any suggestions… that would really be appreciated!

  3. Cas,

    I just visited your site and I saw the same error that I had. However, I just refreshed it and it went away. Did you apply my fix? Let me know!
    -HTD

  4. Cas,

    I just visited your site and I saw the same error that I had. However, I just refreshed it and it went away. Did you apply my fix? Let me know!
    -HTD

  5. Without your hint, it would not have been possible to get my site running without the error again I guess, not in such a short time.
    What I did was deleting (okay, not the best option ;)) that part of the code you pointed out and eveything changed back to normal.

    I checked out the main functions of my site and it seems to work as usual. Thank you very very much for your help, the web needs more people like you! All the best!

  6. Without your hint, it would not have been possible to get my site running without the error again I guess, not in such a short time.
    What I did was deleting (okay, not the best option ;)) that part of the code you pointed out and eveything changed back to normal.

    I checked out the main functions of my site and it seems to work as usual. Thank you very very much for your help, the web needs more people like you! All the best!

  7. Hey, thanks for the tip.

    Any idea how to edit the tag.php file to work with the new tagging system? I’m getting a “Fatal error: Call to undefined function: utw_showcurrenttagset()” error after converting categories to tags..

    – Aaron

  8. Hey, thanks for the tip.

    Any idea how to edit the tag.php file to work with the new tagging system? I’m getting a “Fatal error: Call to undefined function: utw_showcurrenttagset()” error after converting categories to tags..

    – Aaron

  9. I came here from Nalin’s forum. Thanks so much for the hack to the category field. It worked fine.

    I’m very new to WP and know basic coding by following instructions. I’ll get there eventually. Do I need to install a plugin to make the Aside category work? I chose to widgetized my HemingwayEX theme. I also selected the recommendation to use the name Asides as the category on the option page. But my post keeps showing up as a regular post.

    Any help in solving this would greatly be appreciated.

  10. I came here from Nalin’s forum. Thanks so much for the hack to the category field. It worked fine.

    I’m very new to WP and know basic coding by following instructions. I’ll get there eventually. Do I need to install a plugin to make the Aside category work? I chose to widgetized my HemingwayEX theme. I also selected the recommendation to use the name Asides as the category on the option page. But my post keeps showing up as a regular post.

    Any help in solving this would greatly be appreciated.

  11. @ Aaron

    I haven’t taken a deeper look yet at other things that might be not working completely right with HemingwayEX. But I will dig some more later when I have time.

    @ ilysah

    You don’t need a plug-in. So, you are saying that you set the category as “Asides” in the HemingwayEX Options? Under the Presentation > Widgets, did you drag the Asides Widget to one of the sidebars? Also, when you post, you need to be sure that the ONLY category you use is the “Asides” one, otherwise it WILL show up as a post and not an Asides.

    Hope that helps!
    -HTD

  12. @ Aaron

    I haven’t taken a deeper look yet at other things that might be not working completely right with HemingwayEX. But I will dig some more later when I have time.

    @ ilysah

    You don’t need a plug-in. So, you are saying that you set the category as “Asides” in the HemingwayEX Options? Under the Presentation > Widgets, did you drag the Asides Widget to one of the sidebars? Also, when you post, you need to be sure that the ONLY category you use is the “Asides” one, otherwise it WILL show up as a post and not an Asides.

    Hope that helps!
    -HTD

  13. Hi TechDad,
    Thanks for your post :) I haven’t yet made the changes as per your post (but will do) but was wondering how to change the ‘tags’ page to display *only* the current tag?
    For instance, if I click on ‘Cellular’ it will take me to the page with posts all tagged with ‘Cellular’. I’ve tried using ‘the_tags’ and ‘wp_tag_cloud’ but the first gives no result, and the latter gives me a list of all the most popular tags like a tag cloud instead.
    Any help would be much appreciated! :D
    Thanks!

  14. Hi TechDad,
    Thanks for your post :) I haven’t yet made the changes as per your post (but will do) but was wondering how to change the ‘tags’ page to display *only* the current tag?
    For instance, if I click on ‘Cellular’ it will take me to the page with posts all tagged with ‘Cellular’. I’ve tried using ‘the_tags’ and ‘wp_tag_cloud’ but the first gives no result, and the latter gives me a list of all the most popular tags like a tag cloud instead.
    Any help would be much appreciated! :D
    Thanks!

  15. @ Mosey,

    Hmmm. I haven’t dug around the coee yet and I have a feeling there are probably some other things that need to be fixed.

    @ Smate,

    Glad it worked out for you!

    -HTD

  16. @ Mosey,

    Hmmm. I haven’t dug around the coee yet and I have a feeling there are probably some other things that need to be fixed.

    @ Smate,

    Glad it worked out for you!

    -HTD

  17. Thanks a ton for this fix, I just implemented it and everything seems to be working great. I love what you’ve done with your site and the changes you’ve made to HemingwayEx… will definitely be lurking around to get more of an idea of what you’ve done!

  18. Thanks a ton for this fix, I just implemented it and everything seems to be working great. I love what you’ve done with your site and the changes you’ve made to HemingwayEx… will definitely be lurking around to get more of an idea of what you’ve done!

  19. @ Darren,

    I haven’t looked for it specifically, but you can probably open the file that contains it and look to replace the same items that I mentioned above.

    @ David,

    Your welcome!

    @ Gwytherinn,

    You are welcome as well. Glad that you like the site…took a little while to get the CSS the way that I wanted it. If others like it, I may release it some time…that is, when I actually have time to do so (grin).

    -HTD

  20. @ Darren,

    I haven’t looked for it specifically, but you can probably open the file that contains it and look to replace the same items that I mentioned above.

    @ David,

    Your welcome!

    @ Gwytherinn,

    You are welcome as well. Glad that you like the site…took a little while to get the CSS the way that I wanted it. If others like it, I may release it some time…that is, when I actually have time to do so (grin).

    -HTD

  21. I’m having a different problem. The recent posts block does not work on my homepage, but it does on the post pages – any idea how I can fix this? Thanks in advance!

    DM
    DMblog.ca

  22. I’m having a different problem. The recent posts block does not work on my homepage, but it does on the post pages – any idea how I can fix this? Thanks in advance!

    DM
    DMblog.ca

  23. To everyone who is subscribed to this, please check my post on how to get things working without UltimateTagWarrior and using the new WP 2.3 tagging. Post is here.

    Hope it works for you! LMK!

    -HTD

  24. To everyone who is subscribed to this, please check my post on how to get things working without UltimateTagWarrior and using the new WP 2.3 tagging. Post is here.

    Hope it works for you! LMK!

    -HTD

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Other articles of interest

Global Product Review Disclosure

Disclosure: This is a global disclosure for product review articles on HighTechDad. It does not apply to Automobile reviews and there are other exceptions. Therefore, it may or may not be applicable to this particular article. I may have a material connection because I may have received a sample of a product for consideration in preparing to review the product and write this or other content. I was/am not expected to return the item after my review period. All opinions within this and other articles are my own and are typically not subject to the editorial review from any 3rd party. Also, some of the links in the post above may be “affiliate” or “advertising” links. These may be automatically created or placed by me manually. This means if you click on the link and purchase the item (sometimes but not necessarily the product or service being reviewed), I will receive a small affiliate or advertising commission. More information can be found on my About page.

About HighTechDad

Michael Sheehan (“HighTechDad”) is an avid technologist, writer, journalist, content marketer, blogger, tech influencer, social media pundit, loving husband and father of 3 beautiful girls living in the San Francisco Bay Area. This site covers technology, consumer electronics, Parent Tech, SmartHomes, cloud computing, gadgets, software, hardware, parenting “hacks,” and other tips & tricks.

Recent Articles

Explore Categories

– Advertisement –

Shop Now!

My Favorite Setapp Apps

Affiliates

Wireless in Bulk? Genius! Shop Budget-Friendly, Unlimited Talk & Text Plans at MintSIM.
  • Save 15% Off at Incase
  • Shop Incase Now!

– Advertisement –

Intellifluence Trusted Blogger
Shop HighTechDad-reviewed products
– Advertisement –