WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
I add a "Date Picker" but show nothing (1 post)

  1. imtop10
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic