#21423 closed defect (bug) (invalid)
wp_list_pages() is not aware of the current page inside the loop so the correct css classes are not set
Reported by: | thedaysse | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | 3.4.1 |
Component: | General | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Because is_page() doesn't work inside the loop any widget that calls wp_list_pages() also fails to put the right css on the generated list. The fix is for wp_list_pages() to have an extra option so we can tell it explicitly what $ID we are on when we call it:
'current_page' => 0, would do it
Fixing is_page() and is_singular() so that they give the expected results inside the loop would also solve the issue
Change History (3)
Note: See
TracTickets for help on using
tickets.
Can you provide some code to reproduce your problem? I'm not sure I understand "Because is_page() doesn't work inside the loop any widget that calls wp_list_pages() also fails". is_page() works just fine anywhere in a theme, based on whatever the main loop is.