How WP determines archive page vs single page?
TL;DR: WordPress uses URL query string variables to select a template based on the Template Hierarchy. General template selection steps Permalink structures are used to create rewrite rules. Rewrite rules take a pretty permalink URL and convert it into a plain URL with a query string. Parameters from the query string are used to choose … Read more