0

A custom post type custom also have special custom fields people and location

I am trying to get this in the listing archive page with a filter on people location year (which is the post date) to also work with a pagination.

My current attempt is having all these filter in a form and then post request to the page to change the query of that listing page, but when I click on the pagination the filter $_POST data is removed and returns back to the normal listing without filter.

can someone point me at somewhere that has example of what I am trying to archive?

since my approach i don't think should be the correct way of doing it.

0

If you used people and location as custom taxonomies, you'd be able to build them into a new WP Query instead. In fact, depending on how you're storing your custom fields, you might be able to do it through WP Query without going down the custom taxonomy route. Then, you don't need to post request anything - the query handles everything.

  • each people and location is just a relation meta it links to another custom post type. – vico May 13 '15 at 17:59
  • If you don't want to have to write an entire script for pagination rather than use what's in WP natively, you are going to have to figure out how to push that into the WP_Query for the page. If the WP_Query isn't getting the right query, it won't ever make the right pagination links. – ambroseya May 13 '15 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.