[wp-trac] [WordPress Trac] #40079: Content of static pages does not show when you have a count_post in the theme
WordPress Trac
noreply at wordpress.org
Sun Aug 31 16:32:56 UTC 2025
#40079: Content of static pages does not show when you have a count_post in the
theme
-------------------------------+-------------------------
Reporter: devlink1337 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version: 4.7.3
Severity: normal | Resolution: worksforme
Keywords: | Focuses: template
-------------------------------+-------------------------
Changes (by SirLouen):
* status: new => closed
* resolution: => worksforme
* milestone: Awaiting Review =>
Comment:
I've tested this, and could reproduce it at first with your code.
But closely examining the code, I've noted that you are using `$posts` for
the count thing, which is a [https://codex.wordpress.org/Global_Variables
global set inside the loop].
Simply change the name of the variable, and you will notice that the last
page will show up.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40079#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list