20,062 reputation
32361
bio website stephenharris.info
location Edinburgh, United Kingdom
age 26
visits member for 3 years, 2 months
seen yesterday

Mathematics PhD student at the University of Edinburgh with a (geeky) passion for anything coding related.

I develop WordPress plugins, including the event management plugin, Event Organiser. I also write for Wptuts+

Github | Twitter


Feb
24
comment Limit taxonomy results to a single cpt
Good point about the set_query_var. is_taxonomy is depreciated though, and returns true if 'locations' exists as a taxonomy, not if the locations archive page is being displayed.
Feb
24
revised Limit taxonomy results to a single cpt
deleted 28 characters in body
Feb
24
comment Wordpress posts for multiple years
+1 exact same answer, just 34 seconds quicker :D
Feb
24
answered Wordpress posts for multiple years
Feb
24
revised Limit taxonomy results to a single cpt
added 306 characters in body
Feb
24
answered Limit taxonomy results to a single cpt
Feb
24
revised How to make the BuddyBar fix and scroll with the page
edited tags
Feb
24
comment Metabox doesn't retain values
And you using $meta['link'] = get_post_meta($post_id, 'link', TRUE); rather than $meta = get_post_meta($post_id, '_my_meta', TRUE);? Try var_dump-ing, but otherwise I'm fresh out of ideas :S.
Feb
24
revised $current_user var returns NULL
added 1 characters in body
Feb
24
comment Metabox doesn't retain values
See updated answer. Also get_post_meta($postid,'_my_meta',TRUE); doesn't return an array. get_post_meta($postid,'_my_meta',FALSE); does, but not the one you're thinking.
Feb
24
revised Metabox doesn't retain values
added 1006 characters in body
Feb
24
comment Metabox doesn't retain values
Sorry try updated code.
Feb
24
revised Metabox doesn't retain values
added 113 characters in body
Feb
24
answered Metabox doesn't retain values
Feb
24
comment Get ID of “root-page”
Hope you don't mind the edits :D
Feb
24
revised Get ID of “root-page”
added 337 characters in body
Feb
24
comment Metabox doesn't retain values
Could you try to see why the meta is not saving. I.e. in your checks in my_meta_save, on failure, die with some message: wp_die('Reason for failure') to determine which check you are failing on. Also, you should check its not an auto-save routine.
Feb
24
comment Metabox doesn't retain values
Probably not causing the issue but in anycase you should really use get_template_directory(); to get the Parent theme's directory (and get_stylesheet_directory() if you are after the child theme directory). See Codex.
Feb
24
comment Remove WHERE conditions from search query
Why are you using a search if you don't want to actually search anything...? Could you give a brief outline of what you are trying to achieve - there is probably a better than modifying a search query :D
Feb
24
comment $current_user var returns NULL
Peter - you shouldn't need to load core files manually, please see my answer. Also - please post your solution as an answer, it makes it easier for people to distinguish between question and answers.