417 reputation
210
bio website
location
age 28
visits member for 2 years, 8 months
seen 2 days ago

Dec
3
comment Server side validation
I think the validation part is OK, but there is no real error handling, which is odd, as it is, indeed, something pretty basic. In other words, there is no elegant way to validate, post back errors and then pre-populate fields. Everyone is pretty much on their own on this one.
Aug
28
awarded  Yearling
Jul
30
awarded  Popular Question
Jul
23
comment When moving a WP site, why does wp-admin redirect to old site?
The GUID should not be changed. Read more here: codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note
Jul
22
answered When moving a WP site, why does wp-admin redirect to old site?
Jul
22
answered How can I reduce the number of database query calls for this custom homepage?
Jul
2
awarded  Curious
Jul
16
comment Version control with a team of non-developers
If you only version control half your project, you're not really reaping the benefits. My recommendation would be to not go down that road. If a user touches code, he or she checks it in.
Mar
28
awarded  Yearling
Mar
11
comment Contact information footer
Make sure you follow the specs: Max. 20 characters, can not contain capital letters or spaces codex.wordpress.org/Function_Reference/register_post_type
Mar
10
answered Contact information footer
Feb
11
comment How can I save repeatable fields with one value inside an array?
Yes in terms of $option_name. The serialized array you printed though, does not seem to contain the image ID, just the caption. I don't know what your specific needs are, but I would assume the array would look much like the array I posted above ($_POST['fields']) when stored in the database, in terms of structure i.e. array of image ID/caption pairs.
Feb
11
comment How can I save repeatable fields with one value inside an array?
$option_name could be a string like slides... it's just a key in the database to retrieve your options i.e. array of slides. In terms of Array, you're trying to print an array as a string, but it's an array. Whatever your variable is called that prints Array, try this: echo '<pre>' . print_r($your_variable, true) . '</pre>' and you'll see exactly what the array contains. Then you can grab the appropriate string via the index.
Feb
11
comment How can I save repeatable fields with one value inside an array?
Yes, you should replace fields with something more descriptive, such as slides, but I'd make it more unique in case someone or something else ever uses slides. $option_name would be any string, also as unique as possible, that you'd use to save/retrieve the contents of your array from the database. get_post_meta returns an array of custom fields (in case you have more than one) and unless you specify true as the third argument e.g. $slides = get_post_meta($post_id, $option_name, true), you'll have to supply the index e.g. $slides[0].
Feb
11
revised How can I save repeatable fields with one value inside an array?
added 604 characters in body
Feb
11
answered How can I save repeatable fields with one value inside an array?
Feb
10
accepted Resource Issues: Importing external data into custom post type and keeping records up to date
Feb
10
answered Do i need to keep register_post_type in functions.php?
Dec
17
asked Resource Issues: Importing external data into custom post type and keeping records up to date
Dec
15
awarded  Organizer