Opened 13 years ago
Closed 8 years ago
#12016 closed defect (bug) (wontfix)
get_calendar can output a calendar when there are no posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | template | Cc: |
Description
If a site doesn't have any posts, get_calendar isn't supposed to display a calendar. You can visit a page or have a static home page, and a calendar is displayed. The get_calendar function is looking at global $posts to determine if the site has posts but this variable can contain data from other post_types.
Attachments (2)
Change History (12)
#3
@
13 years ago
I'm not sure i agree with this function not displaying a calender just because i'm viewing a page, or custom post_types..
Many would expect it to either
- Always display the latest posts as selected
OR
- Display a calender based upon the selected post_type (Thats a whole can of worms however)
#5
@
13 years ago
- Keywords 2nd-opinion added
- Milestone changed from Awaiting Triage to Future Release
Note: See
TracTickets for help on using
tickets.
In this patch if $pages exist, function additionally is looking if it contains at least one published post, if no it is looking into DB for this