Forums

<?php wp_get_archives> (how to get ONE category listed (2 posts)

  1. jobmonkey1
    Member
    Posted 1 month ago #

    Hello

    I hope / think this is a simple thing...

    In our left nav (www.FinancialAidFinder.com) we have an archive post list:

    <div class="navmain">FINANCIAL AID NEWS</div>

      <?php wp_get_archives('type=postbypost&limit=6&depth=2'); ?>

    I want to have a second such list but pulling ONLY post headlines that are tagged to a specific category. I tried this but it's pulling the exact same posts as the one above:

    <div class="navmain">SCHOLARSHIP LIST</div>

      <?php wp_get_archives('type=postbypost&limit=4&depth=2'); ?>

    Scholarship posts are cat=4

    Does the problem have something to do with the postbypost type or ...?

  2. jonimueller
    Member
    Posted 1 month ago #

    You are trying to pull posts. You need to tell WP to pull categories, and you are right to limit it to the specifica category.

    Go here: (Go west young man!)

    http://codex.wordpress.org/Template_Tags/get_the_category

Reply

You must log in to post.

About this Topic