Opened 8 years ago
Closed 8 years ago
#927 closed defect (bug) (fixed)
wp_list_pages() returns a blank page title in the list
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 1.5 |
| Severity: | major | Keywords: | |
| Cc: |
Description
When calling wp_list_pages() the returned list contains a blank $title, and therefore nothing appears under Pages. The resulting XHTML for each page entry is ... <a href="/page-slug/" title=""></a> ...
Change History (6)
- Owner changed from anonymous to michel v
- Status changed from new to assigned
comment:4
anonymousbugger — 8 years ago
I've had this bug appear too, when viewing a static page the static page listings don't work.
The solution: the global variable $cache_pages seems to be used twice, in different contexts. Firstly, in wp-includes/functions.php, it stores the posts that generated the current page. Secondly, in wp-includes/template-functions-post.php, it is used to cache all static pages. Clearly, these are different functions, so one of the variables should be renamed -- I renamed all appearances in wp-includes/template-functions-post.php. and everything is now working great.

http://wordpress.org/support/topic.php?id=26677