Home › Forums › Add-ons › Gallery Field › How to extract the serialized array › Reply To: How to extract the serialized array
Thanks for reply @hube2
No, I’m using select manual because I’m not inside of wordpress so you can use get_post_meta()
Something like this
//conection... bla bla bla or
global $wpdb;
$single ="SELECT DISTINCT
ID AS id,
post_title AS title,
(SELECT meta_value FROM ".$wpdb->posts." WHERE post_id = ID AND meta_key = 'images') AS images
FROM
".$wpdb->posts."
WHERE
post_status = 'publish' AND
post_type = 'property'
";
foreach($wpdb->get_results($single, OBJECT) as $rss) {
echo $rss->images; // is array serealized, how extract?
}
I wanted to pull all the images from the Gallery, could be perfectly for full url, Yes
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.