Results 1 to 2 of 2

Thread: Create pages with custom query sorts?

  1. #1
    Thread Starter
    Senior Member herb_'s Avatar
    Join Date
    May 2009
    Posts
    230
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Create pages with custom query sorts?

    I'd like to create pages that display like the category and index pages, but with their own custom query sorts.

    For example: example.com/colorado-shoes/

    Let's say "shoes" is a Category and "colorado" is a value of the custom field "region" (so "colorado" is a choice in a drop-down custom field menu I include in the post-form).

    How do I go about creating a page that displays only posts for shoes in colorado, with the same look/styling of the index and category pages?

    Using the WP custom field search plugin, I can just make a Page within WP titled Colorado. Then include on that page links to the search result pages of the various colorado/category cross searches. This would work, but wouldn't be so pretty.

    Anyone with even some very basic ideas on this would help me greatly. I'll keep reading up on the loop, php, custom templates and such as I'm sure this can be done. I want to find a clean, simple and smart way to do it.

  2. #2
    Thread Starter
    Senior Member herb_'s Avatar
    Join Date
    May 2009
    Posts
    230
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Create pages with custom query sorts?

    Ok, I've got a prototype working.

    I created a custom page template. And I assigned it to a page.

    I copied the index.php code into the page template, and tweaked a few lines, just to see if i could get a custom query by cat=1. It worked. I've got back/next buttons working for pagination, but the asc/desc sort buttons don't work, but I may not use them anyway.

    Next I'll get it to query by a combo of category and custom field key/value.

    I wonder if I'll be setting up a separate page and page template for every custom query I want to setup... or if there's a better way to do it...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)