18 reputation
4
bio website
location
age
visits member for 2 years, 3 months
seen Jan 19 at 11:26

Sep
11
awarded  Supporter
Jan
22
awarded  Popular Question
Jan
27
accepted Gallery with thumbnail carousel
Jan
26
awarded  Scholar
Jan
26
accepted Why is my custom meta box input not saving
Jan
26
comment Why is my custom meta box input not saving
GOT IT!!!! This might be what you meant earlier and I misunderstood through complete ignorance of PHP. I've sat down and gone over the code slowly so that I actually understood what was going on, and managed to sort it. I changed the $new_meta_value variable to: $new_meta_value = ( isset( $_POST['rs_job_gallery'] ) ? esc_attr( $_POST['rs_job_gallery'] ) : '' ); and I now have a working gallery!! :D Thanks a lot for your help mate, I now have a much better idea of what's going on in PHP. I'll mark your answer as accepted.
Jan
26
comment Why is my custom meta box input not saving
Okay, I tried removing that, so it read $new_meta_value = isset( $_POST['rs_job_gallery'] );. This does some strange things. On a page I've already created, new info typed into the meta box and updated simply reverts back to what was there before I removed sanitize_html_class(). If I create a new page, enter something in the meta box and publish it, the entered text changes to "1" (the number one).
Jan
26
comment Why is my custom meta box input not saving
Thanks, it's good to be able to ask a basic question somewhere and not receive a bunch of abuse! :P Looking back, I don't think I've explained the problem very well. What's happening is that I enter the shortcode [galleryview id=1] in the meta box, click update and, once the update has saved, the meta box shows what I've typed as: galleryviewid1. So the code to display the meta is receiving a bunch of strung-together text rather than a shortcode.
Jan
26
comment Why is my custom meta box input not saving
I've tried doing this, but with my (very) limited knowledge of PHP I'm not entirely sure I'm putting it in the right place. I've tried it everywhere I thought you meant but with no luck. Could you show me where this should go. I also wondered if sanitize_html_class had anything to do with it as I've read that this removes spaces so the content can be used as a class. Sorry to keep bothering you with further questions; the next thing on my agenda is to learn PHP properly!! Should I accept your answer if I have further questions? Not sure of the protocol... :S
Jan
25
comment Why is my custom meta box input not saving
Also, I assume if I want to add further meta boxes I have to duplicate the above code for each one?
Jan
25
comment Why is my custom meta box input not saving
Hi Jared, that worked great, thanks! Unfortunately the meta box is stripping the square brackets and equals sign from the shortcode I enter. I have a rough idea this has something to do with security (stopping people entering scripts??)?
Jan
25
asked Why is my custom meta box input not saving
Jan
24
answered Gallery with thumbnail carousel
Jan
22
awarded  Student
Jan
22
asked Gallery with thumbnail carousel