WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Category-sensitive archive page (3 posts)

  1. extrakun
    Member
    Posted 5 years ago #

    I am trying to create a category archive page, in which links to posts (not an excerpt of the post) from a category is displayed, sorted by date. I understand that this can be done by creating a custom archive page using page template but...

    How do I pass the category id of the category I want over to the custom page template? Say in a theme I have a link for my category.php which says "View Archive for this Category" - I could retrieve the cat-id, but how do I pass it over to the custom page?

    (Compounding the problem, I am using permalink so my URL are like: http://www.gamestopica.net/about/ -- can I just inject query string at the end?)

  2. scribu
    Member
    Posted 5 years ago #

    You can pass the category id like this: http://www.gamestopica.net/about/?category=cat_id and you can retrieve it using $_GET['category']

  3. extrakun
    Member
    Posted 5 years ago #

    Thanks, that would help greatly!

Topic Closed

This topic has been closed to new replies.

About this Topic