When your website means business.

ACF, PHP, WP/CP | Type: PHPCommon WP functions converted to variables

Sometimes functions are easier to use in conditional statements if converted to variables.

$excerpt = get_the_excerpt();
$date = get_the_date( 'F j, Y', $post_id ); //post date
$url = get_template_directory_uri();
$link = get_the_permalink();
$title = get_the_title ();

$startdate = DateTime::createFromFormat('Ymd', get_field('evstart_date')); //ACF custom field

then used in template:

echo $startdate->format('l, F j, Y');
Menu
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Cookies Notice