Set featured image to archive.php

At the moment I create a new page, set a featured image and link a certain CPT template to show all those CPT’s (by using a query) with the featured image on top. However, this is in my opinion the wrong way to do this because each time I create a new CPT I’ll have to create a new template. My page types now look like “default, cases, products, clients, …” which is not the purpose of a template.

I tried using archive-CPT.php which will automatically loop through the correct CPT but the problem is that I can’t use a featured image anymore. I could, but I want to change/remove/add the image via WordPress like I do with pages…

How would I be able to achieve this the right way?

Read more here: Set featured image to archive.php

Leave a Reply

Your email address will not be published. Required fields are marked *