Include post_date in search

I was able to receive the solution from the developer. Add the below code into functions.php and then rebuild the Relvanssi index. This worked for me. function rlv_index_post_date( $content, $post ) { $date = get_the_time( “F Y”, $post->ID ); $content .= ” $date”; return $content; } add_filter( ‘relevanssi_content_to_index’, ‘rlv_index_post_date’, 10, 2 );

Adding a number to a date

You need get_the_time, not the_time to get the date (the latter echo‘s the value). You also need to re-evaluate how you’re trying to calculate the end date – you can’t just “add” the number of days. What if the event length was 3 but the start date was the 31st? if ( $event_length ) { … Read more

Array sorting assistance

If you change the saved date format to YYYY-MM-DD HH:MM (always with leading zeroes). You can use the usort() array sorting function from php. usort( $array, function( $a, $b ) { return strcomp( $a[‘show_date_and_time’], $b[‘show_date_and_time’] ); } ); Without changing the date format you need a more complex compare callback: usort( $array, function( $a, $b … Read more

Display datetime in user’s timezone

You could use a service like Google Timezone you could get the users lat/lng data using geolocation then store that in a transient agains the IP address. Don’t rely on the IP as users on a satellite connection like me can have the location pinged as thousands of km away.

How to display Date and Time in Tamil Language?

Unfortunately as describes it is far from trivial to display just the date in localized format. The function for localized date output in WP is date_i18n(). But it doesn’t have a concept of output in arbitrary locale. It always takes locale to use from global $wp_locale context. You would have to pretty much rebuild this … Read more

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