Support » Fixing WordPress » Category widget doesn't work

  • Resolved otelianimmo


    Like a crazy person, I bought a template without widgets.

    So I widgetized it, adding a category and an archive widget. Everything LOOKS good (

    But the widgets don’t work. Can anyone point me in the right direction?

    MANY thanks!


Viewing 8 replies - 1 through 8 (of 8 total)
  • the widgets might be ok, but there could be somthing odd with archive.php of your theme.

    can you paste the code of archive.php (or index.php if archive.php does not exist) into a and post the link to it here?

    Thanks, alchymyth! I appreciate the help.

    Here’s the link:



    If anyone has a suggestion, I’d sure appreciate it.



    thanks for the code of the archive template;
    some of the code doesn’t make sense or is simply wrong;
    it certainly would not allow the flexibility to show various types of archives; and it would not get the right category to show.

    first, make a backup copy of your template, in case the suggested changes are going wrong.

    then try this instead:

    OMG! Alchymyth, it works like a champ! Thank you SO MUCH!

    I’m a PHP neophyte, so it will be great for me to compare these two documents. The author of my template had no intention of widgetizing, so maybe that’s one reason the code was just plain wrong. I don’t know.

    In the meantime, I’ve also visited your site for some very helpful information.

    Please let me know if there’s anything I can do for you! You’ve totally MADE MY DAY.



    The author of my template had no intention of widgetizing, so maybe that’s one reason the code was just plain wrong.


    an archive template ‘knows’ automatically what to show; so all the query_posts() code was unneccessary.
    by adding a category based query, the monthly archive was made impossible.
    in case one has to create a query of an category archive, the line would simply be:
    query_posts('cat=' . get_query_var('cat') );
    get_the_category() is a function to be used within the loop, to get the categories of a single post. it cannot properly work in a category archive to get the category information.

    on the positive side – the design and the animation is quite nice 😉

    HAHA. I’m glad there is a positive side. I’ve had quite a time getting this template to work. My client liked it so much, and I don’t know enough (yet) to make a template from scratch. So I kept banging my head against the wall.


    One of my next tasks: to have the category and archive selection yield a list, not full posts. I thought one needed a search.php file to make this happen, but there isn’t such a file. Any suggestions or links to other sites? I’ve been all over the web the past two days, and will keep at it until I wrangle this.

    I am going to get the hang of WordPress under the hood one day!


    Hey, Alchymyth, I did it! WELL, I have replaced “content” with “excerpt” before, but this one seemed not to work right away. Anyway, it’s not a perfect solution (it’s a little difficult to tell that this is a list, not several short blogs), but it’ll do for a while. Any suggestions welcome.

    Thanks for all of your help.

    Your student,


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Category widget doesn't work’ is closed to new replies.