12,231 reputation
1853
bio website christopherdavis.me
location Lexington, KY
age 28
visits member for 3 years, 6 months
seen Dec 17 at 3:06

I work as a web developer for Enterprise clients and build web applications with PHP.

Connect


Sep
25
comment get_the_post_thumbnail() returning empty string on custom post type
You'll need to post more context. Saying a function doesn't work without any context of how it's used doesn't give us much to go on. Most WordPress functions are not deterministic: calling the_post_thumbnail in different places on the page with the same inputs may yield different results, for instance. Depends on global state, etc.
Sep
23
revised Using preg_replace to filter custom textarea
Pass $post into the function rather than using a global.
Sep
23
comment Using preg_replace to filter custom textarea
Also, you don't need a global. Tell add_action to pass two arguments and the second will be the $post object.
Sep
23
comment Using preg_replace to filter custom textarea
Add an explanation about what was wrong to this answer, and how you fixed it. Then accept it. Helps the next person who comes along.
Sep
23
revised Using preg_replace to filter custom textarea
added 318 characters in body
Sep
23
comment Using preg_replace to filter custom textarea
oooo, good catch. I don't think there is one.
Sep
23
comment Using preg_replace to filter custom textarea
This has nothing to do with un-escaped regex. The % is not a meta character. preg_quote('%%PROPOSAL_LINK%%') === '%%PROPOSAL_LINK%%'; in other words.
Sep
23
answered Using preg_replace to filter custom textarea
Sep
16
awarded  Revival
Sep
11
awarded  Necromancer
Sep
3
comment How to create a flexible abstraction for WP_Query?
"Never ask for -1." I would say: put a filter on -1 so users with huge sites can change it if they need to.
Aug
26
awarded  Enlightened
Aug
26
awarded  Nice Answer
Aug
13
comment How to override javascript files in child theme?
Keep in mind when this was written: two years ago. Before wp_enqueue_scripts could be used to only enqueue scripts on the front end. Updated. If you see something out of date, feel free to edit.
Aug
13
revised How to override javascript files in child theme?
added 2 characters in body
Aug
2
reviewed Approve WP NAV MENU - Dropdown always showing
Jul
31
revised Changing bloginfo description from a plugin
formatting.
Jul
22
revised make Wordpress image captions responsive
Fix a link.
Jul
22
comment Remove custom post type in url?
Your regex is wrong (no leading ^), and this is a terrible idea. You're going to prevent WordPress from matching any other things with this. In other words, this will probably 404 every page -- except for the rare instances where .*? actually matches a custom post type's slug.
Jul
22
answered displaying recent comments outside loop without plugin