filters – Is possible register two archive pages for single custom post type?

Question

I have a custom post type registered with register_post_type( 'courses', $args ); (like documentation), and I use template archive-courses.php for page www.example.com/courses. I’m using this archive to show default view, with some query string filters, with pagination, and default layout.

Now I need another page with same funcionalities of file archive-courses.php has, like paginations, query string and more.

I need use two URLs simultaneosly like www.example.com/courses and www.example.com/calendar. This second page need use same registered courses of post type /courses, but with different archive page. The idea is use differents filters for this page with different layout, but with all functionalities that are avaliable for archives templates.

The question:

  1. Is possible register two archive template for same custom post type, but with different URLs?
  2. If not (1), is possible publish one default page and trough some add_filter/add_action load functionalities o archive template (like pagination, query strings)?
  3. If not for all, has some suggestion to do this?

Thanks.

0
rafaelfndev 1 month 2022-08-12T20:16:59-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse