• I need help. I published three post photos on different days with different dates. Why the dates are not in sequence but inserted according to when they were published ..!?

    example:
    https://i.stack.imgur.com/PQplG.png

    enter image description here I wish that if something public on August 18 to appear among those added on that date and not next to the August 24 or August 10

    function photo_settings_source() {
        global $post;
    	$ph_date           = get_post_meta($post->ID, 'ph_date', true);
    	$ph_venue          = get_post_meta($post->ID, 'ph_venue', true);
        echo '
    <p>
        <input style="margin-top:-5px;" id="upload_button" class="button" type="button" value="Upload Photo" />
    </p>
    <p>
       <label style="display:block;padding-top:2px;">' . __('Release photo (yyyy/mm/dd)', '') . ': </label>
       <input type="text" size="15" name="ph_date" id="event-date" value="' . $ph_date . '" /> Click inside the field, Data Picker.
    </p>
    <p>
       <label style="display:block;padding:2px;">' . __('Venue', '') . ': </label>
       <input type="text" size="15" name="ph_venue" value="' . $ph_venue . '" /> Enter Venue.
    </p>';
    }
    
    function photo_settings_save($post_ID = 0) {
        $post_ID = (int) $post_ID;
        $post_type = get_post_type( $post_ID );
        $post_status = get_post_status( $post_ID );
        if ( "photo" == $post_type && "auto-draft" != $post_status ) {
        update_post_meta($post_ID, "ph_date", $_POST["ph_date"]);
    	update_post_meta($post_ID, "ph_venue", $_POST["ph_venue"]);
        }
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘correct date for each post / photo’ is closed to new replies.