WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 3 months ago

#23202 new defect (bug)

Enable is_page_template() within the Loop

Reported by: wpsmith Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch dev-feedback
Focuses: template Cc:

Description

There have been a few times where, in the loop, I need to know if I were on a page using a specific page template.

The function in_the_loop() provides this functionality for us to expand is_page_template().

Attachments (2)

23202.patch (779 bytes) - added by wpsmith 15 months ago.
23202.alt.patch (1.1 KB) - added by wpsmith 7 months ago.
Alternative solution

Download all attachments as: .zip

Change History (5)

wpsmith15 months ago

comment:1 alexvorn215 months ago

  • Component changed from General to Template

comment:2 wpsmith15 months ago

  • Keywords has-patch dev-feedback added

wpsmith7 months ago

Alternative solution

comment:3 nacin3 months ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added
Note: See TracTickets for help on using tickets.