wp_nav_menu add class to the “a” in WordPress

Please add below code inĀ functions.php

add_filter( ‘nav_menu_link_attributes’, ‘aviweb_menu_add_class’, 10, 3 );

function aviweb_menu_add_class( $atts, $item, $args ) {
$class = ‘anc-nav-link’;
$atts[‘class’] = $class;
return $atts;
}

Check date expired or not using PHP code

Please check below code:-

$todays_date = date(“Y/m/d”);
$today = strtotime($todays_date);
$exp_date = ‘2018/06/06’;
$expiration_date = strtotime($exp_date);

if($expiration_date >= $today) {
echo ‘Not expired’;
}else{
echo ‘Expired’;
}