• Hi
    I have a site where I am passing a postcode/zipcode by query string to a new page. I want to filter the content on this page (not filter conmments or posts). For example each zip code will have an attached consultant. So I want the page to display the details of the relative person to contact when their zipcode /postcode is carried across. All the consultants and their details are in a table called tblConsultants in the database.
    Am I querying on the page or back in the database.
    Everything seems to be based on the post style backbone I need it to work as a CMS.
    Thanks in advance.
    Cheers
    Peter

Viewing 2 replies - 1 through 2 (of 2 total)
  • My first thought is to create a Taxonomy for the zip code, and assign consultants to the correct taxonomies. Then WordPress can easily do the filtering for you.

    It sounds like that might mean you have to get their zipcodes out of the database and assign to correct taxos, though.

    Is tblConsultants a WordPress table, or table from some other system?

    Paul

    Thread Starter downsy42

    (@downsy42)

    Hi Paul,
    thanks for getting back to me.
    Yes I have set up a table in the wordpress database tbl_consultants. This table contains fields:
    consultantID, name, address etc
    Users enter a zipcode on the home page and it is redirected to the consultant page passing a query string.
    For eg: ?zipcode=2001
    Each consultant has their details and is assigned to a range of zip codes which are located in a 2nd table called tbl_consultant_areas. It has fields :
    consultantID, areaID and zipcode.
    So I need to filter the details showing up on the page by the zipcode passed to it.
    Thanks
    Peter

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter content, not posts/comments by Query String’ is closed to new replies.