Forum Replies Created
-
AuthorPosts
-
[email protected]
ParticipantThanks Anh, didn't realize you could use 'fields', neat trick thanks!
[email protected]
ParticipantOK sorry just managed to get on to this, that all worked just need to make sure to include global $post; ! ๐
[email protected]
ParticipantHi Anh,
Perfect thats sorted it ๐
Thanks so much.
[email protected]
ParticipantSorry dont think it is working as it's not detecting it as an array anyway that was me fiddling but still saving as json array which is odd!
[email protected]
Participant[email protected]
ParticipantThanks Anh, that would be it!
Shows on a new property so all fine, thanks.
[email protected]
ParticipantHi Anh,
Yeah I tried json decode, I assume when I loop through I just have $value[$i] for the increment and that should save correctly in the DB?
Thanks
[email protected]
ParticipantI think it's the way WordPres get_post_meta gets the values so might be best if I use rwmb?
[email protected]
ParticipantPerfect thanks Anh, will give it a go and let you know the outcome.
[email protected]
ParticipantOh thank you so much Anh that has been annoying me for ages!
Another issue though as I am extracting an array and saving it, one of the fields is saving like this:
["View of the Kitzb\u00fcheler Horn Mountain Top","Wellness and Sauna","Open Fireplace","Video Intercom","Modern and Contemporary "]
Is this a json array and can I just use json_decode()?
Thanks
[email protected]
ParticipantHi Anh,
Still not got it to work all values seem to be passing through but they just aren't saving to the post. Updated code:
[email protected]
ParticipantHi Anh,
Got round to trying this and it seems to run a few times?
https://ghostbin.com/paste/6tcft
Thanks for your help again.
[email protected]
ParticipantThought so, thanks Anh will give it a go and see how we get on.
[email protected]
ParticipantThanks Anh,
Sorry whats the best way to pass the fields from rwmb_before_save_post to after_save_post?
3 functions?
[email protected]
ParticipantAh sorry prefix should be _ property _ no spaces.
Ah ok, is there a way I can achieve what I am trying to do it says hook still passes old/new values?
Thanks
-
AuthorPosts