I’m trying for an if than statement to setup a code that only changes my class if the test name has not been set yet. When I tried this code:
<?php if (get_sub_field('session-title')="TBA") {
$sessionbgclass="";
}else{
$sessionbgclass=" dark";
};?>
when i use this code i get this error:
“Can’t use function return value in write context”
What am I doing wrong?
i believe i figured it out.
it works if i change the first line from:
<?php if (get_sub_field('session-title')="TBA") {
to
<?php if (get_sub_field('session-title')=="TBA") {