Opened 10 years ago
Closed 10 years ago
#28941 closed defect (bug) (invalid)
CPT slug crashes a query because it has the word 'for' in it?
Reported by: | perthmetro | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
See my WP support forum post below
Basically, in the code i provided if the word "for" is part of a CPT slug and separated by hyphens (property-for-sale) then the word "for" is picked up as php code and screws up the query. Notepad++ also picks it up as php.
I know very little about php but I think i'm on to something here.
Change History (2)
Note: See
TracTickets for help on using
tickets.
it is fixed if the slug is bracketed by a '
e.g.
'post_type' => property-something-sale, works ?why
'post_type' => property-for-sale, crashes
'post_type' => 'property-for-sale', works