• I’m currently using the “Category Images” plug-in, and it works great in every way except one: it won’t link correctly to the corresponding category, it just produces a link to “spireintegrated.com/blog/?cat=” – to which it’s obviously lacking the ID which goes along with this. What confuses me, is that if the images are showing up with the respective categories, then it does have the ID but loses it somewhere along the way.

    I’ve checked out the section of the code which deals with this in the plug-in:

    $thelist .= '<a href="' . get_category_link($category->category_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">';

    I can’t see anything too obviously wrong.

    Anyone ever have this problem or simply has enough time to take a look in the code to figure it out?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jasonadams

    (@jasonadams)

    I’m bumping this back up just for the sake of having lost time during waiting for the filter to let this post through. Please take no offense.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Try $category->cat_id instead of $category->category_id.

    Also, this will probably break with WordPress 2.3, which no longer uses those sort of variables. So be careful when upgrading.

    Thread Starter jasonadams

    (@jasonadams)

    Hmm, I tried changing it out as you suggested and it didn’t appear to make any difference. I wish I was more savvy in this particular code and syntax, as I’m rather new to WP and the way it works. If anyone has any further suggestions on what to do or knows of any good sites for learning the WP code, it’d be appreciated.

    Also, thank you for the heads up on WP 2.3 – is there a place I could go to see the new sort of variables being used in 2.3? It doesn’t seem the author of this plug-in is updating it anymore, so I may need to do it myself.

    Much appreciated, all!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Finding the Category ID’ is closed to new replies.