Support » Plugins and Hacks » Post Types Order » Custom Filed Info disappearing after re-order

  • cinemaduro


    I’ve got some custom post types for an equipment rental database. Re-ordering items with the plugin works great, except that the custom information that is saved with each item disappears. “built-in” WordPress functions like the title, description, and featured image remain, but my custom filed information like prices and product URL disappear.

    Do you have any suggestions to get this working with the re-order plugin?

    This is how I’m saving the meta info for the equipment (in functions.php):

    function equipment_meta() {
      global $post;
      $custom = get_post_custom($post->ID);
      $dayprice = $custom["day_price"][0];
      $weekendprice = $custom["weekend_price"][0];
      $weekprice = $custom["week_price"][0];
      $product_site = $custom["product_website"][0];
      	<label style="display:block; float:left; margin-right:20px; margin-bottom:10px;">Day Rate: $<input type="text" size="8" name="day_price" value="<?php echo $dayprice; ?>"></input></label>
      	<label style="display:block; float:left; margin-right:20px; margin-bottom:10px;">Weekend Rate: $<input type="text" size="8" name="weekend_price" value="<?php echo $weekendprice; ?>"></input></label>
      	<label style="display:block; float:left; margin-right:20px; margin-bottom:10px;">Week Rate: $<input type="text" size="8" name="week_price" value="<?php echo $weekprice; ?>"></input></label>
      	<label style="display:block; float:left; margin-right:20px; margin-bottom:10px;">Product Website: (including http://) <input type="text" size="50" name="product_website" value="<?php echo $product_site; ?>"></input></label>
      <br class="clear" />
    add_action('save_post', 'save_details');
    function save_details(){
    	global $post;   
    	update_post_meta($post->ID, "day_price", $_POST["day_price"]);
    	update_post_meta($post->ID, "weekend_price", $_POST["weekend_price"]);
    	update_post_meta($post->ID, "week_price", $_POST["week_price"]);
    	update_post_meta($post->ID, "product_website", $_POST["product_website"]);

  • The topic ‘Custom Filed Info disappearing after re-order’ is closed to new replies.