Get the value from serialized custom fields
-
I’m trying to get the value from serialized custom fields
My _cp_showroom have this structure:Array ( [home] => 1 [cod] => 30408 [tamanho] => 23 [peso] => 0,25 Kg [attachment] => Array ( [0] => Array ( [url] => /2011/05/Banana-Bag-Runner1.jpg [cor] => 8 ) [1] => Array ( [url] => /2011/05/Banana-Bag-Runner2.jpg ) [2] => Array ( [url] => /2011/05/Banana-Bag-Runner3.jpg ) ) )
I’m trying this to get de ‘home’ key:
$args = array ( 'cat' => 5, 'showposts' => 4, 'meta_key' => '_cp_showroom', 'meta_value' => array( 'home' => 1 ), 'meta_compare' => '=' ); $wp_query = new WP_Query( $args );
Can anyone help me?
Thank you…
- The topic ‘Get the value from serialized custom fields’ is closed to new replies.