Date comparison : which date format?

The date format for entering the date is largely irrelevant. strtotime will convert a lot of different formats to UNIX time. Just make sure your input format makes sense to your users and make sure that your feed strtottime a format that correctly converts to UNIX time. If you are storing data in the *_postmeta … Read more

Make datestamp for status updates show time

Just go to Settings > General, scroll down to the date formatting section, select custom, and type this: F jS, g:i a which yields a date like: June 1st, 7:29 pm The official WordPress docs give the letters to use for time formatting.

Display yesterday’s last post’s Custom field from Unique terms of one Taxonomies

I hope I understood everything correct: display a specific custom field from a custom post-type post assigned to a specific term in a custom taxonomy for todays and yesterdays latest entry I can’t solve this task improving your SQL-statement, but you can try the following function using standard WordPress stuff: function show_latest48h_post_cf_in_term( $cpt, $tax, $term_slug, … Read more

check if a draft has been moved there from publish to draft

As far as I can see, you won’t get any indication a post was previously published, as wordpress remembers only the old versus new transitions. I recommend you add some meta data, that is use add_action(‘publish_post’, ‘your_function’) (or similar) to do update_post_meta($post->ID, ‘post_published’, ‘on’). That way, every post gets an indicator when it’s published – … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)