Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $meta = array();
  2. while ( $loop->have_posts() ) : $loop->the_post();
  3. $ID = get_the_ID()
  4. $meta[] = array(
  5. "id" => $ID,
  6. "post_name" => get_the_title(),
  7. "stock_status" => get_post_meta( $ID, '_stock_status', true ),
  8. "price" => get_post_meta( $ID, '_price', true ),
  9. "reguler_price" => get_post_meta( $ID, '_regular_price', true ),
  10. "image" => basename( get_attached_file( $ID ) ),
  11. );
  12. endwhile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement