New answers tagged

0

New versions of jQuery do not support the href=# selector syntax and require href="#"syntax. Something on your site uses an deprecated syntax. Deactivate plugins/theme until you find which one is it, and contact its author's support.


1

This function should be displaying both modified and published dates only if they differ. if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } Dates are compared using ...


0

For those who experienced the same problem, I finally found a way to do the sort. First I created an extra CMB like this : $cmb->add_field( array( 'id' => $prefix . 'session_gooddatebegin', 'type' => 'hidden', ) ); Then I created an action using save_post. If the CPT "session" is being updated, thanks to $update, I assume that ...


0

In a nutshell this is a poor format to store date. You get results you get because 05 < 20 < 22 in that example. You are merely comparing strings and in these date strings day of the month is leading. You wouldn't be able to easily cast it to MySQL DATE either since that one got YYYY-MM-DD format. If you need sort you should store your dates in ...


0

This works for me (inside the loop)... <?php $date = get_post_meta($post->ID, 'CUSTOM-FIELD-HERE', true); if($date != ''){echo date("l jS F Y", strtotime($date));} ?>



Top 50 recent answers are included