I have a custom post type that I would like to have the archive page be based on a page template. So that I would create a page using a template, and then assign that page to act a custom post type archive.
I see this being in done for WooCommerce where you select which pages are to be what section, or in buddy press.
but not sure how to go about it with general custom post types and archives.
Question posted in Woocommerce
The official Woocommerce documentation can be found here.
The official Woocommerce documentation can be found here.
2
Answers
What you can do better is set the archive to false and create a custom loop yourself. you can insert it via a shortcode (woocommerce used to do it this way too).
There are two ways:
1.) If the page template already contains the custom loop which calls those CPTs, create an empty page in the WP backend and select your page template as its page template.
2.) Or rename your page template php file to "archive-xxxxx.php", where "xxxxx" should be replaced by your CPT name. (see also https://developer.wordpress.org/themes/basics/template-hierarchy/ for details).