Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meta = array();
- while ( $loop->have_posts() ) : $loop->the_post();
- $ID = get_the_ID()
- $meta[] = array(
- "id" => $ID,
- "post_name" => get_the_title(),
- "stock_status" => get_post_meta( $ID, '_stock_status', true ),
- "price" => get_post_meta( $ID, '_price', true ),
- "reguler_price" => get_post_meta( $ID, '_regular_price', true ),
- "image" => basename( get_attached_file( $ID ) ),
- );
- endwhile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement