Getting the following error:
Warning: date() expects parameter 2 to be long, string given in /home/15063/brooks/www.brooks-shopping.co.uk/public_html/wp-content/themes/sandbox/functions.php
on line 546
Which points to the line:
$day = date("l, F jS", get_post_meta($post->ID, 'date_value', true));
Can someone suggest, what changes are required to the above line to resolve this please?
Date expects parameter 2 to be a long. i.e. it expects a number to be returned.
You return a string (assuming) with
get_post_metaYou need to convert it to a time first before you can return it (a date long)
Instead try
The
strtotimefunction return anintas shown here