• imtop10

    (@imtop10)


    I add a Date Picker custom filed “updated” to show a date,if “updated” is empty,it shows modified date,else show the “updated” date.Why it is blank when “updated” is not empty?I use this code:

    <?php
    	$date = get_post_meta($post->ID, 'updated', true);
    	if(!($date))
    	$date = the_modified_date('F j, Y');
    ?>

    See the page here,now it is blank for the “updated” item.
    While I use this the_field('updated'); instead of get_post_meta($post->ID, 'updated', true); it shows both of them.

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  • The topic ‘[Plugin: Advanced Custom Fields] I add a "Date Picker" but show nothing’ is closed to new replies.