90 reputation
10
bio website
location
age
visits member for 2 years, 6 months
seen May 6 at 20:14

Apr
22
awarded  Commentator
Apr
22
comment Custom post type term names with ampersand in the term name
When I try to attach a term to a custom post type where the term name includes an ampersand WordPress finds the term fine (when doing the type ahead search) but because WP is not turning the & into & it never finds the term in the database when trying to attach it to the post. So I add the term in the admin edit post screen and hit update post and the post never has the term I just tried to attach when it finishes. The code I provided fixes it but I can't believe that's a proper fix. It holds the term name. Thank you!
Apr
22
asked Custom post type term names with ampersand in the term name
Apr
1
comment Strange problem with wp_get_attachment_image_src database (db) query count
@TheDeadMedic That appears to reduce the query count by between 50-100 queries but if I comment out that the wp_get_attachment_image_src part it goes down by ballpark 300 queries. Seems really strange that manually specifying an integer post id fixes the problem.
Apr
1
asked Strange problem with wp_get_attachment_image_src database (db) query count
Mar
26
awarded  Curious
Mar
25
asked WordPress Query Count
Jan
16
awarded  Popular Question
Dec
21
awarded  Popular Question
Nov
12
awarded  Popular Question
May
18
accepted Shortcode adding p and br tags
May
17
awarded  Teacher
May
16
answered Shortcode adding p and br tags
May
16
comment Shortcode adding p and br tags
Charles - Tell me what you need but that is very close to what I've got with the exception of method names & identifying information stripped and simplified some. It's definitely and issue with the "view" but again I've done this elsewhere.
May
16
comment Shortcode adding p and br tags
mindctrl - I added the view which is part of the problem as it definitely has line breaks. Removing the line breaks works adding them back in just breaks the HTML again.
May
16
revised Shortcode adding p and br tags
Added example of view that is not rendering correctly and some more detail
May
15
comment Shortcode adding p and br tags
Charles - With that I don't even get the shortcode tag replaced. My page has [myshortcode] on it.
May
15
comment Shortcode adding p and br tags
Charles - Yes, and unfortunately that didn't work either. I've written shortcodes before that did not have this issue using the same technique (in fact on the same site).
May
15
asked Shortcode adding p and br tags
Feb
18
awarded  Editor