How replace post date with event date

Ok, great. It is using the posts for concerts, parties…etc. You need to create a plugin: Simply, create a folder inside the /wp-content/plugins and name is /my-events-plugin Create a new PHP file, name it my_events_plugin.php, and use the following template: https://www.smashingmagazine.com/2011/09/how-to-create-a-wordpress-plugin/ There is this tutorial that will get you to adding the custom field and … Read more

Worpdress function for difference dates

Put this in the appropriate template. <?php echo human_time_diff( get_the_time(‘U’), current_time(‘timestamp’) ) . ‘ ago’; ?> Normally the php file you should look for would be entry-meta.php Remember to use a child theme..

How to get date of post when using wp_get_recent_posts()?

You can see everything returned via php’s var_dump or print_r: $recent_posts = wp_get_recent_posts(); echo ‘<pre>’; print_r( $recent_posts ); echo ‘</pre>’; This will reveal that the date is stored in post_date: foreach( $recent_posts as $recent ): echo $recent[‘post_date’]; endforeach; Or to format the date, use php’s date and strtotime: echo date( ‘l F jS’, strtotime( $recent[‘post_date’] … Read more

Copyright: Get first and last date of post type

There was an issue with the code originally posted by kaiser in that it queried for year, month and day distinctly resulting in values representing “the largest month for any date” or the “smallest day for any date” rather than values representing the MAX and MIN dates globally. I altered that original code to query … Read more

Separately formatting date elements

I believe all the info you need is in the PHP Manual for Date/Time. Also, it is recommended that you use get_the_date(); instead of the_date(); Get them month in 3 cap letters? M is the right format character that outputs a short textual representation of a month (3 chars). Why can’t you use CSS to … Read more

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