Advertisement
BobbyAdamson

Addressing problem with Smashing Magazine's Custom Post Type

Mar 17th, 2014
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. function product_price_box_content( $post ) {
  2.     wp_nonce_field( plugin_basename( __FILE__ ), 'product_price_box_content_nonce' );
  3.     $meta_values = get_post_meta($post->ID, 'product_price', true);
  4.  
  5.     echo '<label for="product_price"></label>';
  6.     if($meta_values != '') {
  7.         echo '<input type="text" id="product_price" name="product_price" placeholder="enter a price" value="' . $meta_values . '"/>';
  8.     } else {
  9.         echo '<input type="text" id="product_price" name="product_price" placeholder="enter a price"/>';
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement