In context of the template hierarchy chart? From what i gather, the paged.php file is something to do with an archive?
Leave a Reply
You must be logged in to post a comment.
In context of the template hierarchy chart? From what i gather, the paged.php file is something to do with an archive?
You must be logged in to post a comment.
If we look in
template-loader.php
, we can see the conditions under whichpaged.php
will be loaded:The last
elseif
is where the paged template is loaded if it exists:Which means that all of the checks above have to return false for the
paged.php
template to be loaded, the queryis_paged
and no other more content-specific template was found.Yup, if you have
paged.php
present in your theme, that template will be used for all but the first page of the archive. This is in case the styling/markup for your archive is drastically different between the first page, and subsequent pages.Note that as of WP 4.7 paged.php has been removed from the template loader altogether and thus the template hierarchy.
https://core.trac.wordpress.org/changeset/38755