Opened 15 years ago
Closed 15 years ago
#14779 closed defect (bug) (worksforme)
File paged.php in theme seems will never be loaded
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.1 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
Description ¶
There is a function 'get_paged_template' which will load paged.php in the theme if 'is_paged' conditional tag is true.
But when I create paged.php for my paged posts, it seems that the file is not loaded. The blog always load index.php instead.
My guess is in WP Query class, when a paged posts is called, the $is_home variable is still set to be true. So when the template loader executed, Wordpress will always load index.php
Pull Requests
- Loading…
Change History (7)
#4
@ Lead Developer
15 years ago
get_paged_template() only works for index.php, which to me makes sense. Sometimes the index page may have a drastically different design than page 2 of the stream of content. But if you're trying to use paged.php for paginating, say, any archive such as dates, category, tag, etc... it won't work. In that case you need to use is_paged().
Suggesting we close as worksforme.
is_home should be set regardless of is_paged.
The paged.php template is a bad idea to start with because it doesn't fit in the template hierarchy at all. You'll see it's not even mentioned. I think we should deprecate it.
You should just use the is_paged() conditional tag inside a single template file.