Kwebble : Blog

  • Archives for a category WordPress plugin

    Gepubliceerd op 15 augustus 2007 in Programming. 195 reacties

    For the new version of this website I wanted to show a list of monthly archives, limited to posts of a specific category. The software used to run this website is WordPress but the wp_get_archives() function, to get a list of archives, does not have the ability to filter on category. So I created the ‘Archives for a category’ plugin that enhances this function to show archive links for a specific category.

    Installation

    1. Download the plugin zip file and unzip the file in a temporary directory.
    2. Put the kwebble_archives_by_cat.php file in your WordPress plugin directory:
      <your wordpress dir>/wp-content/plugins
    3. Activate the plugin ‘Archives for a category’ on the Plugin Management page of the WordPress administration panel.
    4. Optionally disable the canonical URLs from the menu Settings | Kwebble.
      A WordPress feature added in version 2.3, called canonical URLs, redirects browsers on certain URLs. This also happens with the URLs for the archives with a cat parameter. This causes the archive pages to contain posts which do not belong to the selected period.

      To solve this problem the plugin can disable canonical URLs. This uses the technique used in the Disable Canonical URL Redirection plugin Mark Jaquith made. So if you are already using that plugin you don’t need to change the setting for this plugin.
      To disable canonical URLs go to the administration section of your blog, choose Settings and the Kwebble settings. On that page you will find a checkbox to disable canonical URLs.

    Usage

    After installing and activating the plugin the wp_get_archives() function accepts a ‘cat’ parameter to specify the categories of posts to show in the list of archives. The value of the ‘cat’ parameter must be a list of one or more category ID’s, separated by comma’s.

    If you specify the value of a category ID the posts from that category will be used to create the list of archives. If you place a minus sign ‘-’ in front of an ID the posts from that category will be excluded.

    Depending on the number of categories, your use of them and selection of categories to include in the archive list it may be easier to specify all categories to include or just those to exclude.

    You need to make sure the template used to show each archive displays posts from the selected category. I’m using category specific templates on this site, like category-id where id is the ID of the category to display. You can use other templates in the template hierarchy, but make sure the template shows items of the categories you specify.

    At some WordPress version the categories ID’s are no longer visible on the administration pages. You can find the ID of a category by opening the page to edit the category and inspect the URL of that page. The value after cat_ID= is the ID of the category.

    Examples

    Show the default monthly list of archives for category 1:

    <?php wp_get_archives('cat=1'); ?>
    

    The same list, but with posts from categories 1 and 3:

    <?php wp_get_archives('cat=1,3'); ?>
    

    Use posts from all categories except category 2:

    <?php wp_get_archives('cat=-2'); ?>
    

    Use posts from all categories except categories 2 and 8:

    <?php wp_get_archives('cat=-2,-8'); ?>
    

    Create a list of archives for category 1 as a dropdown box:

    <?php wp_get_archives('format=option&cat=1'); ?>
    

    Limitations

    This plugin does not work for weekly archives. The list with archive links is correct, but the links themselves do not include the category. So when used, WordPress will not filter the resulting page on the category. The technical reason is that WordPress does not apply filters when the links for weekly archives are generated, so the plugin can’t change them. Perhaps in a next version of WordPress…

    This plug-in was developed and tested to work correctly with WordPress version 2.7.1, but it probably works with earlier versions back to 2.2.1.

    Older versions

    These are earlier versions of the plugin. Use them only if you have a specific reason for not installing the current version.

    Version 1.4a

    27-03-2009 Download

    • Corrected post count when posts belong to multiple categories.
    • SQL queries now respect the configured SQL table prefix.
    • Templates with multiple calls to wp_get_archives(), with and without ‘cat’ parameter, generate correct URL’s.

    Version 1.4

    22-02-2009 – Added option to exclude categories. Download.

    Version 1.3

    6-01-2008 – Added support for multiple categories. Download.

    Version 1.2

    23-11-2007 – Added support for WordPress 2.3.1. Download.

    Version 1.0

    15-08-2007 – Initial version, works with WordPress 2.2.1. Download.

    Copyright

    Copyright 2007, 2008, 2009 Rob Schlüter. All rights reserved.

    Licensing terms

    • You may use, change and redistribute this software provided the copyright notice above is included.
    • This software is provided without warranty, you use it at your own risk.
    • php
    • plugin
    • wordpress

    175 Reacties

    1. Queenvictoria 4-10-2007 (22:08)

      Avatar

      thanks kwebble for this . here is the update to make it work with the v2.3 version of wordpress .

      function kwebble_getarchives_where_for_category($where, $args){
      global $kwebble_getarchives_data;

      if (isset($args['cat'])){
      // Preserve the category for later use.
      $kwebble_getarchives_data['cat'] = $args['cat'];

      if ( get_bloginfo('version') > 2.3 )
      $where .= ' AND post2cat.category_id=' . $args['cat'];
      else
      $where .= " AND taxonomy.taxonomy = 'category' AND taxonomy.term_id = " . $args['cat'];
      }
      return $where;
      }

      and later


      function kwebble_getarchives_join_for_category($join, $args){
      global $wpdb;

      if (isset($args['cat'])){
      if ( get_bloginfo('version') > 2.3 )
      $join .= ' JOIN ' . $wpdb->post2cat . ' post2cat ON post2cat.post_id=ID';
      else
      $join = " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = taxonomy.term_taxonomy_id) ";

      }
      return $join;
      }

    2. Queenvictoria 4-10-2007 (22:14)

      Avatar

      sorry that should be less than not greater than 2.3

      function kwebble_getarchives_where_for_category($where, $args){
      global $kwebble_getarchives_data;

      if (isset($args['cat'])){
      // Preserve the category for later use.
      $kwebble_getarchives_data['cat'] = $args['cat'];

      if ( get_bloginfo('version')

      and later


      function kwebble_getarchives_join_for_category($join, $args){
      global $wpdb;

      if (isset($args['cat'])){
      if ( get_bloginfo('version') post2cat . ' post2cat ON post2cat.post_id=ID';
      else
      $join = " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = taxonomy.term_taxonomy_id) ";

      }
      return $join;
      }

    3. Rob Schlüter 5-10-2007 (20:00)

      Avatar

      Thanks, I didn’t realize the plugin needed an upgrade for the new Wordpress version.

      I’ll test this when I upgrade my site to the 2.3 version and if everything is ok I will post a new version of the plugin.

    4. Mike 31-10-2007 (20:22)

      Avatar

      Just installed the plugin myself (within WP v2.3.1) and it needed queenvictoria’s modification.

      However, if you are going to try it yourself: just copy & paste the code from queenvictoria’s FIRST post (from “4 october 2007, 22:08) and then modify the ‘greater than’ symbol to a ‘less than’ by hand in BOTH instances.

      It looks as if the code got messed up when submitting the second post (from “4 october 2007, 22:14″)

    5. Rob Schlüter 1-11-2007 (9:28)

      Avatar

      Thanks for the note.

      In the coming days I’m upgrading my development version of the site to WordPress 2.3.1. Then, if everything works ok, I’ll upgrade my site and make a new version of this plugin available.

    6. jay 20-11-2007 (16:11)

      Avatar

      If you’re going to use this with WordPress 2.3, you’ll have to use the plugin which disables canonical redirects. The new version of Wordpress doesn’t correctly process the URLs to show archives only in a given cat. (Specifically URLs like /2007/10/?cat=1 won’t work unless canonical URLs are disabled.)

      Here’s the plugin…
      http://txfx.net/files/wordpress/disable-canonical-redirects.phps

    7. Rob Schlüter 21-11-2007 (21:58)

      Avatar

      At the moment I’m testing a new version of the plugin and also noticed that the URL’s generated by the plugin are redirected incorrectly creating archive pagess with incorrect posts.

      To solve this I’m adding the possibility to disable canonical URLs from the administration menu.

    8. Rob Schlüter 23-11-2007 (23:30)

      Avatar

      A new version (1.2) with WordPress 2.3 support is now available.

    9. stephen 29-12-2007 (10:12)

      Avatar

      This is really great, but I was wondering if there was a way to show multiple categories.

    10. Rob Schlüter 30-12-2007 (23:57)

      Avatar

      Using multiple categories is not possible at the moment. I’ll have a look to see if I can add support for more than 1 category.

    11. steve 1-01-2008 (23:24)

      Avatar

      That would be great!

    12. Rob Schlüter 6-01-2008 (14:29)

      Avatar

      Just updated the plugin to version 1.3, which adds support for multiple categories.

    13. jack 22-01-2008 (2:32)

      Avatar

      exactly what I needed, thanks!

    14. Tony 23-01-2008 (4:34)

      Avatar

      Hi, this was exactly what I was looking for! And using it along with the category-id.php works very well! Thank you so much!

    15. cj 25-02-2008 (23:33)

      Avatar

      Hi, love the plug-in, it works great. One question though, is there a way to make the monthly category archives use the archive template instead of the category template? Thanks

    16. Rob Schlüter 26-02-2008 (13:19)

      Avatar

      cj, perhaps you could rename the category template and create a new one that checks if a category or archive page is requested, and include() the appropriate template.

      I think you’ll have check for a part in the URL that identifies the requested page type, for example a date pattern, because the is_archive() is also true for category pages, according to the Codex .

    17. slambert 11-03-2008 (6:46)

      Avatar

      this is great. Curious if it’s possible to show the number of posts next to the month and year. for example August 2007 (6) If there were 6 posts from that month.

    18. Rob Schlüter 14-03-2008 (21:37)

      Avatar

      @slambert: does the parameter show_post_count you can use with wp_get_archives do what you need?

    19. slambert 16-03-2008 (23:55)

      Avatar

      @rob Schülter: yes and no. That’s the functionality, but I still want to filter it by category. Make sense?

    20. Zef 13-04-2008 (0:41)

      Avatar

      Just posting to say thank you SO much for creating this plugin. I’ve had a day of searching and you have saved my website!

    21. Tom 28-04-2008 (20:07)

      Avatar

      I just noticed that this plugin doesn’t work in Wordpress 2.5. Any plans to update it? Thanks for your work so far — it’s a very helpful plugin.

    22. Rob Schlüter 28-04-2008 (22:01)

      Avatar

      I will investigate what’s the reason 2.5 breaks the plugin.

    23. tom 20-05-2008 (14:37)

      Avatar

      @rob: I was wrong. It IS in fact working in Wordpress 2.5. Sorry for the confusion.

    24. Chi 21-05-2008 (17:15)

      Avatar

      Hi.. Nice plugin.. Unfortunately, it isn’t retreiving children category posts.. Pls help!

    25. Rob Schlüter 22-05-2008 (8:12)

      Avatar

      It need some time to find out how to generate a URL that includes all child categories.

      If the category structure of your site isn’t that complex and doesn’t change often then, as a temporary solution, you could add the child categories to the cat parameter, separated by comma’s:

      <?php wp_get_archives('cat=1,3,7,8,19'); ?>

      This will include posts from all those categories in the archive.

    26. Jeff 3-07-2008 (13:13)

      Avatar

      Just wanted to say thank you. Really appreciate the work :)

    27. Nicole 16-07-2008 (0:42)

      Avatar

      Hi there,
      great plugin and easy to use!
      Just wondering, I want to Archive via Year, not month.. can this plugin do that?

    28. Rob Schlüter 16-07-2008 (8:17)

      Avatar

      wp_get_archives can generate yearly archives by using the type parameter, which is part of WordPress itself. Use something like this to combine it with a category selection:

      <?php wp_get_archives('type=yearly&cat=1'); ?>

    29. ann 15-08-2008 (20:08)

      Avatar

      thanks! this saved me tons of headache!

    30. Steve Meisner 2-09-2008 (20:04)

      Avatar

      Thanks, it works great in 2.6.1.

    31. Paul 8-10-2008 (11:01)

      Avatar

      with this plugin will the function accept negative value, that is can this be used to EXCLUDE certain categories from being listed, that is filter out ?

    32. Rob Schlüter 8-10-2008 (12:39)

      Avatar

      No, you can’t exclude categories by using negative values.
      It would require some changes to the way the cat parameter is placed in the SQL to select matching posts.

    33. Paul 8-10-2008 (12:48)

      Avatar

      ok, i can work around it – im my case im trying to use it to publish a news (facts) index section, actually a category, and keep it separate to a blog (opinion) section even though they run off 99% similar standard blog templates.

    34. Carl-Johan 20-12-2008 (0:19)

      Avatar

      Great plugin! This should really become a basic function in wordpress. Maybe you could submit it to them.

    35. Rob Schlüter 20-12-2008 (14:08)

      Avatar

      @Carl-Johan in the current situation this plugin conflicts with the canonical URLs feature. That should be resolved to be included, I expect.
      But surely I agree :-) , it would be a useful addition.

    36. anders 21-01-2009 (12:36)

      Avatar

      Hi!

      Is it possible to exclude categories with this plugin this also?

      f.ex:
      wp_get_archives(’type=monthly&cat=-7′);

      If not it would be great if you added this in a later edition! ;D

    37. Rob Schlüter 21-01-2009 (13:36)

      Avatar

      @anders: no, excluding doesn’t work. I’ll have a look to see if it’s not too difficult to add since you are the second person asking for it.

    38. anders 23-01-2009 (9:02)

      Avatar

      thanks! ;D

      and one more thing!
      Is it a way to display a category (by ID) and all childrens of that category, without typing their ID in?

    39. Russ 2-02-2009 (19:45)

      Avatar

      Great plugin! It did EXACTLY what I needed it to. Super-easy and brilliant!

    40. luke 3-02-2009 (20:00)

      Avatar

      thanks!
      exactly what i need…..

    41. Susan 9-02-2009 (19:07)

      Avatar

      Amazing — I searched for something I had expected WP to handle but did not, ie,:

      and you immediately solve the problem with #1 hit.
      Thank you!

    42. Susan 9-02-2009 (19:09)

      Avatar

      search term didn’t show up. It was

    43. Susan 9-02-2009 (19:10)

      Avatar

      one more try
      “”

    44. Jonathan 16-02-2009 (2:42)

      Avatar

      Would also love it if this would allow for category exclusion :) .

    45. Sarah 17-02-2009 (11:33)

      Avatar

      I wish this was 2.7 compatible.
      Is there any chance you’ll update it?
      Please?

    46. Rob Schlüter 17-02-2009 (14:31)

      Avatar

      @sarah: I haven’t heard about problems with 2.7 and since I don’t use that version myself, could you let me know what problems you encounter?

    47. damien 20-02-2009 (13:04)

      Avatar

      @Rob Schlüter
      and How to exclude categories?
      and can I create a list of archives, with posts from categories 1 AND 3 (! its not a 1 OR 3)?

    48. Rob Schlüter 20-02-2009 (23:03)

      Avatar

      Sorry Damien, at the moment only posts from the selected categories, no AND/OR/EXCLUDE.

    49. Rob Schlüter 22-02-2009 (22:55)

      Avatar

      Version 1.4 is now available. Now you can exclude posts from categories by putting a minus sign (-) in front of a category ID.

      It’s a fresh version that’s only been tested on a development environment, but it looks OK. Enjoy.

    50. damien 23-02-2009 (12:59)

      Avatar

      How to use your plugin with the tags?
      Thank you for updating!

    51. Rob Schlüter 23-02-2009 (13:44)

      Avatar

      @damien: see ‘Examples’ on this page for the syntax you have to use.

    52. peach 3-03-2009 (23:38)

      Avatar

      fyi – works great in wp 2.7.1. thanks!

    53. Vlad 17-03-2009 (8:30)

      Avatar

      Hello Rob,

      Thanks for developing this plugin.

      I think I have found a bug – if I have a post that belongs to two categories, it will be displayed twice in the archives when I use the &cat parameter. The only way to avoid this is to make the cat parameter specify ONE of the categories it belongs to.

      For example, if my post is a member of categories 3 and 5 and I do &cat=-1, it will be listed twice, but if I do &cat=-1,3 then the post will be listed once.

      I think this just requires a small change to the plugin’s WHERE or JOIN query, but I cannot figure it out myself as I am unfamiliar with WordPress’ schema.

      I am using WordPress 2.7.1.

    54. wp 23-03-2009 (4:06)

      Avatar

      this plugin is a lifesaver. thanks!

    55. danjothebanjo 25-03-2009 (17:58)

      Avatar

      Hi There – your plugin is the only thing out there that does what I needed thanks! Just one thing i saw above that one of your users also wondered how to force the request to use the archive template rather than the category template. As soon as I pass the cat parameter to the function it starts using the category template? Any ideas?
      Thanks again.

    56. Rob Schlüter 25-03-2009 (22:10)

      Avatar

      @vlad: correct, in the described situation the post count is wrong. I’m figuring out a solution

      @danjothebanje: true, according to the template hierarchy when a category is present in the request the category template is preferred over the archive template. Perhaps you can use is_archive() in the category template to test if an archive is requested or not and include the appropriate template.

    57. danjothebanjo 26-03-2009 (12:25)

      Avatar

      thanks Rob, I actually used is_date() in a conditional statement in my category template to get the template looking right – thanks again

    58. Rob Schlüter 27-03-2009 (13:58)

      Avatar

      Version 1.4a is available for download. Changes:
      - Corrected post count when posts belong to multiple categories.
      - SQL queries now respect the configured SQL table prefix.
      - Templates with multiple calls to wp_get_archives(), with and without ‘cat’ parameter, generate correct URL’s.

      enjoy

    59. Becky 27-03-2009 (23:56)

      Avatar

      It’s not working for me. I used and nothing is showing up. What am i missing?

    60. Rob Schlüter 28-03-2009 (12:25)

      Avatar

      Becky, could you give me some more information? What is not showing, the list of archives or the complete page with archived posts?

      And how does the call to wp_get_archives() look like? Does it include the ‘cat’ parameter to select categories?

    61. bill 3-04-2009 (23:23)

      Avatar

      Rob- Thanks for your work on this plugin.

      If I understand correctly, in order to get the sidebar archive widget to only show a particular category, I need to edit the widget.php file as follows:

      becomes

      There are 2 instances of the wp_get_archives() in widgets.php. Do I need to edit both? Am I doing the edits in correct file? Thanks.

    62. Rob Schlüter 5-04-2009 (19:06)

      Avatar

      @bill: I haven’t used widgets and don’t really know much about them. widgets.php appears to me as a collection of widgets that come with WordPress. Adding the ‘cat’ parameter probably changes the ‘Archives’ widget and I expect it to work fine. But since you’re editing a core file be careful that updating WordPress doesn’t overwrite your changes!

    63. Selsobesy 8-04-2009 (10:06)

      Avatar

      mm. thank you..

    64. Dorothea Schäfer 9-04-2009 (0:13)

      Avatar

      Great!
      Theank you very much.

    65. Jukka 18-04-2009 (23:10)

      Avatar

      Hi!

      I have a small problem with the plugin. It works like a charm with current month, but not for earlier months.

      I have two categories. If there aren’t any posts in category 1 for say January, the month won’t show on the archive list, so that’s fine. But when I call posts from catgory 1 and there are some, the plugin also shows posts from category 2 for that month.

      Do you have any idea why this is happening?

    66. Rob Schlüter 19-04-2009 (16:53)

      Avatar

      @jukka: it’s a bug. I’ve resolved the problem and updated the plugin. The new version (1.4b) is available for download.

      In this version the support for multiple calls to wp_get_archives(), with and without ‘cat’ parameter, is removed. This feature was the cause of the bug.

    67. Jukka 20-04-2009 (7:49)

      Avatar

      Thank man! Works great now.

    68. Karl 21-04-2009 (13:28)

      Avatar

      Hi there,

      Thanks for the plugin, just what I needed! Agree with posters above, would be great if this was simply built into WP core, pretty logical call.

      Another related issue I’ve never been able to solve, is giving the currently viewed archive a current-class – is this anything that could be built into your plugin? Then one can use CSS to list which month is being viewed.

      1. Karl 14-12-2009 (17:37)

        Avatar

        Just came across some code in the WP forums about creating a function to exclude one or more categories from the wp_get_archives – http://wordpress.org/support/topic/292286. This might be enough for those just wanting to exclude a category from a yearly view.

    69. Vince Brown 21-04-2009 (22:16)

      Avatar

      Thanks mate

    70. Rob Schlüter 22-04-2009 (11:55)

      Avatar

      @karl, marking the currently viewed archive looked like a nice challenge so I did some testing and came up with a basic solution.

      But the plugin parses the generated HTML for the archives and that’s not something I like. I want to see if I can come up with a better solution and publish it as part of this plugin or as a separate one.

    71. Saeid Zebardast 24-04-2009 (15:45)

      Avatar

      Thank you :)
      Its useful.

    72. Stereo Interactive 25-04-2009 (18:47)

      Avatar

      Thank you Rob, it is so nice of you to share this with us all.

    73. Karl 27-04-2009 (9:24)

      Avatar

      @Rob,

      Thanks for looking into the highlighting issue – would be interesting to hear what you come up with!

    74. Eric Curtis 7-05-2009 (2:21)

      Avatar

      Just wanted to say thank you for this plug-in. It was just what I needed for my last project.

      FYI, I found a conflict with this and WP-Security Scan. When both were active your plug-ins functionality was broken.

      Cheers.

    75. Cisco 15-05-2009 (10:43)

      Avatar

      Hello, thanks for your plugin,
      can you add the parameter “child_of” ? Because when I type the global category, there’s no list.

    76. june 18-05-2009 (3:00)

      Avatar

      I dropped this my plugins directly and its not showing up in my admin interface. I’ve installed other plugins without a problem. Using 2.7.1

    77. Rob Schlüter 18-05-2009 (20:05)

      Avatar

      Thanks for the responses. Perhaps a small forum would be easier for communicating issues and new features then these comments…

    78. Brad 21-05-2009 (22:16)

      Avatar

      This seems to be the only solution for excluding cats from get archives, i cant get it to work though sadly,

      The archive list goes blank when i add cat=-2 but works when i remove it

      Im using 2.7.1

    79. pirkka 22-05-2009 (16:15)

      Avatar

      I have the same problem.

    80. Scott 28-05-2009 (11:31)

      Avatar

      Just wanted to say thanks for the plugin, works great for me on 2.7.1.

    81. Ash Haque 6-06-2009 (8:14)

      Avatar

      Thank you!
      This was exactly what I was looking for, works great

    82. Matt 11-06-2009 (14:22)

      Avatar

      I’m having trouble as I have this: domain…./2009/05/?cat=4 when I click it though, it fwds to the url of the category: domain…category/the-category/ and it displays all the posts for all the months, rather than the posts for just may. Any ideas?

    83. Rob Schlüter 12-06-2009 (13:01)

      Avatar

      @matt: perhaps it helps to disable canonical URL redirect. You can do this on the Settings > Kwebble page.

      Note that this influences other URL’s handling also, see the linked page for more info.

    84. james 19-07-2009 (7:17)

      Avatar

      hi all, thanks for this plugin and posts:

      the concept of this plugin is exactly what i need, but i am not understanding all the comments on this post.

      i installed the plugin and have the line :

      Archives

      in my sidebar.php page, but when i view my wordpress page, the archive widget still shows all cat posts, not just cat=5.

      Am i missing something ?

      thanks

      p.s. i am rockin WP ver 2.7.1

      1. Rob Schlüter 19-07-2009 (13:01)

        Avatar

        That’s correct, the default Archives widget doesn’t ‘know’ my plugin and doesn’t offer an option to select a category. The calls in sidebar.php are probably only used when the theme is used in a older WordPress installation without current widget support.

        I was working on a new version of my plugin that includes an improved Archives widget. But while I was finishing it, WP 2.8 was released and the widget support has completely changed. There are now 3 or 4 ways to build widgets and because of these frequent changes to the WP core I haven’t decided yet about releasing a new plugin version, and supporting it.

        1. David 3-12-2010 (21:12)

          Avatar

          I am using WordPress 2.8.4

          I think I amy be having this same problem. I can use your plugin just fine on my “News” page. The sidebar only displays the category or archives that I choose. However, once you click on a month in that sidebar, and it displays the archives for that month, the sidebar reverts back to showing all the categories (for News, Events, Press Releases, etc.).

          Is there a way to change this?

    85. james 19-07-2009 (7:24)

      Avatar

      p.p.s
      I meant that i have wordpress version 2.8.1

      not

      2.7.1

      thanks

    86. jimmy 21-07-2009 (11:52)

      Avatar

      great plugin, but it seems not work in wp 2.8.2. please help. thanks.

      1. Rob Schlüter 21-07-2009 (20:41)

        Avatar

        With a fresh install of WP 2.8.2 plus my plugin and adding 2 testing posts over 2 categories it works fine. Can you give some more details on your results?

        1. jimmy 22-07-2009 (4:07)

          Avatar

          i just put this code in, but it show nothing.

        2. jimmy 23-07-2009 (9:11)

          Avatar

          maybe it conflict with other plugins, any suggestion how to check it conflict with others? please advice.

          1. Rob Schlüter 23-07-2009 (11:45)

            Avatar

            If you turn off all plugins and activate them one by one and each time check to see if it works you may be able to find the plugin that has a conflict.

    87. taro 23-07-2009 (3:46)

      Avatar

      php5&mysql5?

    88. Leandro 23-07-2009 (17:02)

      Avatar

      Thank you, I’ve just installed it and worked like a charm!

    89. Jerry 24-07-2009 (19:01)

      Avatar

      This is just an awesome tool!

      Thanks

    90. bira 29-07-2009 (22:31)

      Avatar

      It worked fine for me in wp 2.8.1 after I’d deactivate the WP Securityscan 2.7.1

    91. richy 30-07-2009 (9:36)

      Avatar

      Thanks a lot, you made my day :-)

    92. Michael Cairns 5-08-2009 (11:39)

      Avatar

      Hmmm, I can’t seem to get the plugin to work for more than one month.

      If you look at the archives here: http://www.lemonroe.com.au/blog/ only August 2009 allows the plugin. I have deactivated all my other plugins but no luck.

      Any help would be great.

      I am using 2.8.3

      1. Michael Cairns 6-08-2009 (2:00)

        Avatar

        Downgraded to 2.8.1 but still no love….any help?

        1. Rob Schlüter 8-08-2009 (10:19)

          Avatar

          Perhaps you also use the WP Securityscan plugin? Others reported that using both plugins may give problems?

          1. jimmy 12-08-2009 (4:10)

            Avatar

            yes. please check that i also have this problem before.

            1. tobi 18-08-2009 (11:12)

              Avatar

              i had the same problem but figured out that i downloaded version 1.4a from the end of this article.

              grab the plugin from the download link in the beginning of the article under “installation”. this is verion 1.4b and the problem is solved…

              1. Rob Schlüter 18-08-2009 (11:35)

                Avatar

                I added a warning to the list of older versions to help people notice they are not downloading the current version and prevent problems.

                1. tobi 18-08-2009 (14:04)

                  Avatar

                  thanks.
                  by the way: your plugin is working on my current wordpress 2.8.4

                  great job.

                2. Joss 10-09-2009 (0:15)

                  Avatar

                  *Slaps Forehead*

                  I accidentally originally downloaded the previous 1.4 version of your plugin.

                  The current version works fine :P

                  Sorry for the hassle – but at least now you know it’s tested with WP 2.8.4!

                  Best of luck and thanks for your help.

    93. jimmy 11-08-2009 (10:48)

      Avatar

      i cannot get the cat parameter in the archive, anything wrong?

      1. Rob Schlüter 11-08-2009 (11:06)

        Avatar

        What code do you use to show the list of archives?

        1. jimmy 12-08-2009 (4:10)

          Avatar

          i just put this code in category.php ,thanks.

    94. Jeremy 17-08-2009 (4:09)

      Avatar

      This is awesome and just what I was looking for…the only problem I have is that I am using this to display a navigation pane of links to archives..whenever I click on the month I wish to see it goes where it should, but the problem is that the navigation pane then will turn into the same old junk where if I click on a month again it navigates away from the specific category and back to an archive of every post on the site.

      Do you know of any way to fix this? Any help is appreciated…I guess what would really need to happen is changing (in archive.php):
      to or having some way to fetch the category id from the url…I dont really know and am a total noob at this stuff…

      Thanks for a great fix, anyhow!

    95. Geoff 17-08-2009 (22:16)

      Avatar

      Great plugin. Thanks for your work.

    96. Anja 3-09-2009 (17:33)

      Avatar

      It doesn’t work for me.
      It’s like there wasn’t a plugin / change. Bah, it was exactly what i was looking for

      1. Rob Schlüter 3-09-2009 (20:38)

        Avatar

        A few checks:
        - the plugin must be activated.
        - if that’s done the ‘Settings’ menu must include a choice called ‘Kwebble’.
        - add a ‘cat’ parameter to the wp_get_archives() call, using an existing category? You can get a page with the posts of a category by adding ?cat= to the URL of your blog.

        1. Anja 3-09-2009 (22:23)

          Avatar

          hey, thanks for the quick response.

          i didn’t get the last point?!

          yes, it is activated, i see the kwebble in the settings. i’ve added to the sidebar. the category which i’d like to have a archive of has the ID 16. i replaced this with the default get_archives in the sidebar?

          here’s the website: http://www.brokenstars.org/ the archives are a mess right now. but “september 2009″ should be showing the entries of diary only. my whole site is build up with categories.

          am i doing completely wrong? :P thanks

          1. Rob Schlüter 8-09-2009 (22:00)

            Avatar

            Did you try to deactivate the canonical URL redirection? The plugin gives the option to do this. Note that it influences URL handling, so it may give other unwanted side effects.

            http://www.brokenstars.org/?cat=16 shows the items of category 16. http://www.brokenstars.org/2009/09/ shows the archive for september. But http://www.brokenstars.org/2009/09/?cat=16 doesn’t combine the criteria. Instead you are redirected to a page with the category.

            PS.
            sorry you had to wait, I missed your comment because it was held in moderation.

    97. Joss 9-09-2009 (10:48)

      Avatar

      Hi Rob,

      This plugin looks like exactly what we’ve been looking for for a while :o )

      I’ve activated it and want to show monthly archives from just the blog, excluding all the other types of post the site uses.

      It works like a charm for the first entry in the archive, but after that, reverts to the regular Wordpress style “Let’s give them everything” style afterwards.

      So, the first (current) month, the link looks like this:

      /2009/09/?cat=4type=monthly

      which is great.

      For all the ones afterwards, it’s back to

      /2009/08/
      /2009/07/

      etc.

      Is there a way to fix this? Something I’ve done wrong maybe?

      Many thanks!

      1. Rob Schlüter 9-09-2009 (12:09)

        Avatar

        Are these URL’s from the generated list of archives on 1 page? If not, be sure to the add the cat parameter in each template of the theme that shows such a archive list.

        1. Joss 9-09-2009 (13:15)

          Avatar

          Thanks for your quick reply!

          Yup, they’re from the same generated list. The code looks something like this:

          wp_get_archives(’cat=4&type=monthly&limit=6&format=custom&before=&after=’);

          …with the output coming out as I posted above – the first link is the correct format, but the following generated links are just the normal archive format (eg. it looks like the plugin hasn’t touched them)

          Any advice?

          Thanks!

          1. Rob Schlüter 9-09-2009 (21:23)

            Avatar

            Ok, just did a fresh install of 2.8.4, added my plugin and some posts. The generated URL’s in the list of archives look like these:
            /blog/?m=200909&cat=3
            /blog/?m=200907&cat=3
            and work ok.

            Perhaps a different plugin interferes? You coulkd deactivate other plugins, activate them one by one and see when the problem occurs.

            1. Joss 10-09-2009 (0:09)

              Avatar

              That’s strange!

              I deactivated all other plugins, also tried removing various arguments from the get_archives string. I’m still getting the following output in my list of archives:

              example.com/2009/09/?cat=4
              example.com/2009/06/
              example.com/2009/07/

              I wonder why it’s not appending the ?cat=4 to the links after the first?

              I’ll try deleting and reinstalling the plugin.

            2. Joss 10-09-2009 (0:16)

              Avatar

              *Slaps Forehead*

              I accidentally originally downloaded the previous 1.4 version of your plugin.

              The current version works fine :P

              Sorry for the hassle – but at least now you know it’s tested with WP 2.8.4!

              Best of luck and thanks for your help.

              (ps. apology for double post of this comment, posted in the wrong place above.)

              1. Rob Schlüter 10-09-2009 (21:00)

                Avatar

                Ok, glad to know it’s not a new bug.

    98. Joss 9-09-2009 (13:17)

      Avatar

      Ps. I’m running the latest Wordpress, 2.8.4.

    99. erim 21-10-2009 (23:29)

      Avatar

      Hi,

      Thanks for the plugin. It’s just what I need, but I can’t seem to get it working. I get a SQL error in my logs when I add the ‘cat=31′ parameter. Here’s the SQL returned:

      SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM wp_posts WHERE post_type = ‘post’ AND post_status = ‘publish’ AND wp_posts.ID IN (SELECT DISTINCT ID FROM wp_posts JOIN wp_term_relationships term_relationships ON term_relationships.object_id = wp_posts.ID JOIN wp_term_taxonomy term_taxonomy ON term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id WHERE term_taxonomy.taxonomy = ‘category’ AND term_taxonomy.term_id IN (31)) GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC made by require, require_once, include, get_sidebar, locate_template, load_template, require_once, wp_get_archives

      I’m running Wordpress 2.8.5.

      Thanks.

      1. erim 22-10-2009 (2:43)

        Avatar

        Oops, I messed that up. Here’s the SQL returned by wp_get_archives() function in general-template.php. It errors if I paste it into phpMyAdmin. Unfortunately, the host this site is running on is using mySQL 4.0.14 and PHP 4.4.1, which could very easily be the problem.

        SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM wp_posts WHERE post_type = ‘post’ AND post_status = ‘publish’ AND wp_posts.ID IN (SELECT DISTINCT ID FROM wp_posts JOIN wp_term_relationships term_relationships ON term_relationships.object_id = wp_posts.ID JOIN wp_term_taxonomy term_taxonomy ON term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id WHERE term_taxonomy.taxonomy = ‘category’ AND term_taxonomy.term_id IN (31)) GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC

        1. erim 22-10-2009 (18:48)

          Avatar

          It occurred to me to try this SQL in phpMyAdmin running on a more recent version of mySQL/PHP (4.1.22/5.2.9) and it works. Also, I can run both the outer statement and the nested select separately on the original server and they work. It seems to be just the combination of the two on the older mySQL version that’s causing the problem. Maybe it’s the join?

          If anybody has any ideas, they’d be most appreciated. I really need this plugin, and I can’t upgrade the server.

          Thanks.

          1. Rob Schlüter 22-10-2009 (19:42)

            Avatar

            I’ll have to do some investigating to see if I can fix it.

            1. erim 26-10-2009 (20:49)

              Avatar

              Thanks Rob. I contacted the hosting company too, just to see if they can do the upgrade. It’s kind of ridiculous they’re running mySQL 4.0.14, released in 2003. Maybe they’ll just upgrade and solve the problem.

          2. Rob Schlüter 26-10-2009 (23:17)

            Avatar

            Just did a test install of WP 2.8.5 and it seems to work fine. But my server runs MySQL 5.1.30.

            In the older MySQL documentation I read that before version 4.1 support for subqueries was limited. I guess that the cause of the problem.

            1. erim 27-10-2009 (18:51)

              Avatar

              Yeah, that’s about what I figured. Thanks for your help though Rob. I think I can get the host to upgrade.

              Thanks again.

              1. ryo 2-11-2009 (4:40)

                Avatar

                Hello,
                I have the exact same problem. It was working prefectly on my MacBook test environment, but it stopped working on a virtual host server running old MySQL 4.0.24…

                Is there any possibility that you make the script backword compatible with older MySQL?

                By the way, thank you very much for your great work! So far yours is the best out there.

                1. Rob Schlüter 4-11-2009 (13:09)

                  Avatar

                  I’ve done a quick test with a version that doesn’t need the subquery in the SQL and it looks like it might work.
                  But I don’t know if that’s enough to make it run on the MySQL version you use. The best solution would be to support the same database version WordPress supports, which is 4.0 or greater. But I’ll see what I can do.

    100. Gary 22-10-2009 (18:22)

      Avatar

      Hi, has anyone gotten this to work in Wordpress 2.8.5? Thanks!

      1. Rob Schlüter 26-10-2009 (23:21)

        Avatar

        Can you explain the problems, I’m not aware of any.

        1. Gary 28-10-2009 (3:10)

          Avatar

          In theory, the following link should take me to the archives for that category for 10/2009:

          http://30thx365.wonggawei.com/2009/10/?cat=28

          However, the URL always changes to the category archive URL:

          http://30thx365.wonggawei.com/category/take-2/

          Any thoughts? The only other active plugin is Askimet.

    101. victor 25-10-2009 (18:05)

      Avatar

      Hello,

      I’ve noticed something interesting. For testing purposes I’ve published two posts in different categories with the date set in the past ex: 12 november 2006. Well, for that month it shows posts from both categories. Why is that?

      Victor

      1. Rob Schlüter 26-10-2009 (23:33)

        Avatar

        Please compare the URL in the list of archives and on the page with the archive for november 2006. They should be equal and both include a cat parameter.

        If the archive page doesn’t, WP redirects to a different URL and looses the category selection. Disabling the ‘canonical URLs’ function may solve this problem, but it might conflict with other functionality on your site, so you’ll need to test.

    102. Erik N 27-10-2009 (0:06)

      Avatar

      I’m having issues with version 2.8.5 as well. I can activate the plugin and all, but when I add the &cat=-14 to the archive code, it doesn’t show any posts at all in the drop-down, just the “Select a Post” text. When I take the code out again, it shows all of my posts in the drop-down archive again. I’ve tried turning off all of my plugins and nothing seems to work! Here’s the code I’m using:
      Select a page!

      Current:

      1. Rob Schlüter 27-10-2009 (22:37)

        Avatar

        Somehow the comment system seems to mess up the code. Could you only post the parameter string passed to wp_get_archives? I’m curious what type of archive you want to show.

    103. Erik N 27-10-2009 (0:07)

      Avatar

      “Select a page!

      Current: “

    104. awesomerobot 6-11-2009 (16:58)

      Avatar

      Interesting little something I found out: the popular plug-in “WP Security Scan” interferes, and it won’t list any archives as long as it’s activated. Not a huge issue, but something to note for anyone having issues out there.

      1. Rob Schlüter 6-11-2009 (22:06)

        Avatar

        previously others have reported problems when that plugin is used. To reproduce them I installed the plugin. After that I couldn’t access the blog or admin pages anymore and gave up.

    105. Vishnu 21-12-2009 (15:07)

      Avatar

      Hai,

      Thanks for this plugin…

      The problem is when i activated this plugin it works well and it shows the particular category i want to show But when i activated the permalink settings(/%postname%/) it works on and it shows the archive list in monthly type for partiicular category but when i navigate through that archive list it shows the post of other categories… abviously it works correctly when i deactivate permalinks …

      The blog was in windows server 2008, wordpress ver 2.8.6, i installed a plugin for SEO url as it is in IIS ….

      Please help any one …
      Thanks in advance..

    106. Tom 23-12-2009 (17:40)

      Avatar

      I’m having the same problem as Vishnu. Seems be to an issue with custom permalinks. Anyone know of a fix for this?

      1. Tom 23-12-2009 (17:49)

        Avatar

        Actually, I fixed it by “disabling canonical URLs”. Disregard!

    107. Barry 11-01-2010 (22:25)

      Avatar

      Hello,

      I’m using your *AWSM* plugin with WP 2.9 and it’s working like a champ.

      I thought I would share a few notes for those who could use clarification:

      I am displaying category archives in a custom template. I created a custom file called category-6.php for this purpose. (The category I am showing is ID=6.) The Wordpress template hierarchy automatically finds this.

      Also, I had to hard-code the entire drop-down format in my sidebar. It would not work with a simple call of wp_get_archives(’format=option&cat=6′). Since I am using a widgetized sidebar, I put the code after the loop that goes out to the dynamic sidebar.

      Looks like this:

      (I don’t think the type=monthly param is necessary but I left it in for some reason.)

      Rob / Kwebble, thank you for continuing to support this useful plugin. I would be ecstatic if you decided to create a widget version.

      Best,

      Barry

      1. Rob Schlüter 12-01-2010 (9:54)

        Avatar

        When I noticed the Archives widget that comes with WordPress I started coding a version of my plugin with an improved widget. I got it working but just before I finished it a new WordPress version was released which changed the API to create plugins or widgets, I don’t know which one. There were already 2 API’s, now a 3rd was added, without stating what was to happen with the other versions.
        Since it was unclear to me what was going to happen I decided not to finish and release it.

        To me as a developer it’s like the platform I’m developing on just changes without prior notice. That’s something I don’t like because I can’t be sure if my code will keep functioning correctly in the future. Since then I’ve frozen further development.

    108. Barry 11-01-2010 (22:27)

      Avatar

    109. Claude Schneider 24-01-2010 (19:26)

      Avatar

      Thanks for the great plugin. I found that the URLs generated aren’t interpreted correctly by WordPress (I’m using MU 2.8.5).
      I’ve got my categories working on this URL structure: /category/slug-name/ and /category/slug-name/page/2/ etc.
      The URL generated by the plugin for a monthly archive is simply /yyyy/mm/?cat=3 which WordPress just redirected to /category/slug-name/ – not doing much for showing the month’s archive.

      I changed one of your functions, so that the URL generated is: /slug-name/yyyy/mm/ – this now works fine.

      Not sure if this is a problem only because of the way I’ve set up this WP site, but hope it may be useful for anyone else encountering the same problem.

      thanks,
      Claude

      function kwebble_archive_link_for_category($url){
      global $kwebble_getarchives_data;

      if (isset($kwebble_getarchives_data['cat']))
      {
      $cat_object = get_category($kwebble_getarchives_data['cat']);
      $cat_slug = $cat_object->slug;
      $blog_url = get_bloginfo(’url’);
      $url = str_replace($blog_url, $blog_url.”/”.$cat_slug, $url);
      }

      return $url;
      }

    110. Dada 1-02-2010 (14:06)

      Avatar

      Thanks so much :) Works perfectly!

    111. Kate 22-03-2010 (3:23)

      Avatar

      Hi,

      I am having some problems with this plugin.

      In the category menu, my urls look like this: /2010/03/?cat=1, however, for every page that I select, it just goes back to the main archive page for the category, so there is nothing much happening.

      I disabled canconical urls, but this didn’t seem to do anything.

      Any ideas?

      Thank you!
      Kate

    112. Kate 22-03-2010 (3:28)

      Avatar

      Oooops, forget the last one. I was using a category template, with the category ID already in the loop. Works fine now. Thanks!

      Kate

    113. Mike 29-03-2010 (9:47)

      Avatar

      Hi!
      I have the same problem as Kate, but a I don’t know how to fix it.

      1. Rob Schlüter 29-03-2010 (11:28)

        Avatar

        Perhaps some other plugin is messing up the URL handling, assuming you’ve tried disabling the use of canonical urls.

    114. Mike 31-03-2010 (12:55)

      Avatar

      Mmmmm…. If I’m using a category template, with the category ID in the loop… ¿what can I do to solve my problem?

    115. Simon 23-04-2010 (17:00)

      Avatar

      Fantastic plugin. I have no idea why this functionality isn’t built into WordPress. Just one question. Can anyone tell me how to use this to automatically show archives of the current category?

    116. Ari Salomon 4-05-2010 (19:50)

      Avatar

      i am confirming this works with wp 2.9.2
      great job! thanks!

    117. Jocelyn 17-05-2010 (6:15)

      Avatar

      Great Plugin. Is there any way to have cat=-3 remove that category and all sub categories?

      1. nosaint 30-08-2010 (17:01)

        Avatar

        simply add cat=-321,-322,-333 (the ids of all subcategories)

    118. Alex Kuznetsof 29-06-2010 (10:11)

      Avatar

      God bless you :-)
      wordpress 3.0 WORKS!!!

    119. Lynn Wallenstein 2-07-2010 (21:49)

      Avatar

      Thanks for the great plugin. Any possibility for an option where AND is actually AND and not IN? I need to get something where it gets me the posts ONLY if they are in two categories (or more).

      Thanks for the awesome work!

    120. pirmin 8-07-2010 (16:13)

      Avatar

      perfect. thanks a lot!

    121. Arpita 6-08-2010 (6:21)

      Avatar

      I am not able to solve issues for this plugin with versionm 3.0.1, but I used this same functionality using query_post function.

    122. Luke Archer 23-08-2010 (9:06)

      Avatar

      Ideally I would like my archive urls like this: mysite.com/cat/year/month/ so the cat replaces the ?cat=x that normally appears.

      Is there any way to achieve this?

      Thank you

    123. Michelle 20-09-2010 (18:21)

      Avatar

      Hello,

      Thanks for the plugin! Just downloaded and installed. I added it to 3 category pages. It pulls the correct list of months for the archive, but only the first month in each archive list has the “cat=3″ tag on the link.

      Example, first link in the list is “?m=20100&cat=3″ but the rest of the links in the list have only the month, such as “?m=20200″.

      My code is simply:

      Have I done somehting wrong or is there a problem with the loop code?

      Thanks for your help!

    124. Michelle 20-09-2010 (18:23)

      Avatar

      ^^I guess the code didn’t show up but it is exactly what is listed in the first example above, simply cat = 3.

    125. Debbie 6-10-2010 (18:24)

      Avatar

      This is a great plugin, thank you so much.

      I too found that when WP Security Scan is active, no results will show. Not a big deal but maybe that will help someone else.

    126. Jes 1-11-2010 (11:16)

      Avatar

      After searching for quite a while, this is exactly what I needed. Thank you!

    127. Mark McLaren 16-11-2010 (8:07)

      Avatar

      Thank you very much for your work on this plugin. I was going nuts trying to figure this out! I don’t understand why this is not in WordPress core for wp_get_archives() Kudos to you! The WordPress community rocks!

    128. Tobia Scandolara 22-11-2010 (15:04)

      Avatar

      I use Wordpress 3.0 but this plugin doesn’t work. Why?
      I tried too disable the canonical url

    129. Webdesigner 9-02-2011 (19:33)

      Avatar

      Thanks for that great Plugin. It works perfectly for me.

      For more custumization you can use it like this:

      ‘monthly’,
      ‘cat’ => ‘1′,
      ‘mcat’ => true,
      ‘limit’ => ”,
      ‘format’ => ‘custom’,
      ‘before’ => ”,
      ‘after’ => ”,
      ’show_post_count’ => false,
      ‘echo’ => 1 );
      ?>

      Best Regards,
      Webdesigner

    130. Vermont WordPress 24-03-2011 (14:43)

      Avatar

      Many thanks, finding this saved me a lot of work.

    131. Kurt 27-04-2011 (7:48)

      Avatar

      Hi!

      Thank you very much for such a great plugin. I have a problem getting it to work 100% with my website. Currently, I use the parameters postbypost and 10, the latter one to limit the number of entries listed.

      However, with these current parameters, I can’t seem to get the cat=-20 work. Any ideas?

    132. Katie @ women magazine 12-05-2011 (9:19)

      Avatar

      Using plugin for such simple task is not good, you can directly call a filter to include or exclude a particular category from wp_get_archives functions. In your fuctions.php file write this

      add_filter( ‘getarchives_where’, ‘customarchives_where’ );
      add_filter( ‘getarchives_join’, ‘customarchives_join’ );

      function customarchives_join( $x ) {

      global $wpdb;

      return $x . ” INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)”;

      }

      function customarchives_where( $x ) {

      global $wpdb;

      $exclude = ‘827,828′; // category id to exclude

      return $x . ” AND $wpdb->term_taxonomy.taxonomy = ‘category’ AND $wpdb->term_taxonomy.term_id NOT IN ($exclude)”;

      }

      To include only specific categories do this

      add_filter( ‘getarchives_where’, ‘customarchives_where’ );
      add_filter( ‘getarchives_join’, ‘customarchives_join’ );

      function customarchives_join( $x ) {

      global $wpdb;

      return $x . ” INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)”;

      }

      function customarchives_where( $x ) {

      global $wpdb;

      $includes= ‘829′; // category id to include
      return $x . ” AND $wpdb->term_taxonomy.taxonomy = ‘category’ AND $wpdb->term_taxonomy.term_id NOT IN ($includes)”;

      }

      1. Anton 6-06-2011 (23:37)

        Avatar

        Katie, what about the URLs the archive links lead to?
        That’s the main thing the plugin solved for me. I did the filters for where and join too but URLs kept fucking up.

        OP, Thanks a lot for this plugin. I might think of extending it in the near future and will contact you if i do so.

        I confirm that it works on WP 3.1.3. (if you turn the canonical URLs off).

    Trackbacks

    1. WordPress 2.3 compatiblity Plugins | Dreamer's Blog
    2. WordPress Plugins Database » Plugin Details » Archives for a category
    3. 2pt3 › archive » wordpress tips
    4. AWSOM.org = Artist Website Setup Options Markup » Blog Archive » AWSOM Archive 1.4.0 released
    5. Archives for a category WordPress plugin
    6. DIY Podcasting on Wordpress | How-tos | ministrypool.com
    7. Removing Categories From A Wordpress Feed | /timelliott
    8. Plugins para Wordpress « La mala memoria
    9. Sugar Blog » Westgate Dental gets a facelift
    10. Archives for a category WordPress plugin (Kwebble blog) « wp-popular.com
    11. Include/Exclude Category from Wordpress wp_get_archives() | The Mighty Mo! Design Co. | Minneapolis Wordpress Developers and Designers
    12. Wordpress site for Hampshire Primary School « Sugar Blog
    13. WordPress Plugins, die codeline.ch ermöglichen | codeline
    14. Broken Link Checker und andere tolle WordPress-Plugins | Ginchens Blog
    15. Wordpress Monthly Archives for a Category | Design Onslaught
    16. Archives for a category « ???
    17. Using WordPress 3 as a CMS | Blog | Reveloper
    18. Alex Barber | Digital Artist | WordPress archives for a category
    19. ????????????? ??WP??? Lifestream ?????? / Devslog
    20. ????????????? ??WP??? Lifestream ?????? / Devslog
  • Rubrieken

    • Artikelen
    • Foto's
    • Links
    • Media
    • Overheid
    • Programming
  • Recente Berichten

    • Stanford Web Applications course lectures
    • The importance of knowing Unicode
    • “If you are not paying for it, you’re not the customer; you’re the product being sold.”
    • Inzage in je gegevens bij Facebook
    • Tuning Oracle UCM 11 & Site Studio performance
  • Gerelateerde berichten

    • Filter .svn folders in Eclipse Navigator
    • Simple Cloud API
    • Showing related articles in a WordPress blog
    • Don’t forget __isset() with overloaded setters and getters
    • PHP tip: omit ?> from PHP only files
  • Abonneren

    • Atom feed Artikelen
    • Atom feed Reacties
  • Archief

© Rob Schlüter - Contact