• hey there.

    i’ve seen a few people asking this question before, but i’ve yet to see any simple answer – hopefully there’s one out there. i only need the archives for a single category to be displayed. i’d really love to be able to do this by manipulating either the “<?php wp_get_archives(‘type=monthly&format=link’); ?>” tag near the very top of the page, or the “<?php wp_get_archives(‘type=monthly’); ?>” line that actually generates the archive list.

    obviously you can see what i’m using to get the archives… i’m not familiar with any alternative way to list the archives which would give me more control. all that the “wp_get_archives” let’s me control is the way posts are listed by date or such… no apparent controls on category.

    any help would be greatly appreciated, i’m certain there has to be a solution which doesn’t require hacking/plugins. please include the context if you’re going to paste code, i’m still new at this. thanks!

    oh, i’m using a seperate page for this, and loading it by “http://blahblahblah.php?cat=1&#8221; if that has any importantance. also, i’m using wordpress ver. 1.2.2

Viewing 3 replies - 1 through 3 (of 3 total)
  • i want to know the answer BIG TIME too…

    I am currently using David Chait’s ChaitGear plugin, specifically his same-cat plugin, found here:

    http://www.chait.net/index.php?p=238

    Also handy would be his Quick PHP plugin, found here:

    http://www.chait.net/index.php?p=310

    Just study the readme files contained in the zip set. I am modifying my car club’s web site at a testbed site, here:

    http://adaugeo.org

    On a separate category page, I have the “President’s Message” and “Member Profile” set up using categ0ry-x.php, where “x” is the category id. Within each of those category pages, I have placed the ChaitGear code to bring up only other items in that category. So that on the President’s Message category page, below the main post, you can see links to all other posts in that category displayed. (I’m working on the style now; so forgive the way it looks; it’s a test site, after all!) Same with the Member Profiles category page.

    On the sidebar, where you see “Events” and “New Members,” those are simply categories set up with short entries. With the same-cat plugin, the links are displayed on the sidebar. However, if you don’t want those little entries displayed as part of the blog, another plugin saves the day, Category Visibility:

    http://www.gudlyf.com/archives/2005/03/08/wordpress-plugin-category-visibility/

    Hope this helps!

    Debes utilizar el Template Tag get posts como en el siguiente ejemplo:

    <ul>
    <?php
    $posts = get_posts('numberposts=5&offset=1&category=1');
    foreach($posts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> --- <?php the_excerpt(); ?></li>
    <?php endforeach; ?>
    </ul>

    Puedes tener más información en http://codex.wordpress.org/Template_Tags/get_posts

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘ANOTHER question about category-specific archives’ is closed to new replies.