Im getting an parse error on this block of code and i can’t figure why. This is the error i get: Parse error: syntax error, unexpected ';' in your code on line 1

    $html = ( isset( $credits ) && empty( $caption ) && '' !== $credits ) || ( isset( $date ) &&  empty( $caption ) && '' !== $date ) ? '<div id="group_it" ' . $style . '>';
    $html .= ( isset( $credits ) && empty( $caption ) && '' !== $credits ) ? '<span class="caption__source">' . $credits . '</span> ' : '';
    $html .= ( isset( $date ) &&  empty( $caption ) && '' !== $date ) ? '<span class="caption__date">' . $date . '</span>' : '';
    $html = ( isset( $credits ) && empty( $caption ) && '' !== $credits ) || ( isset( $date ) &&  empty( $caption ) && '' !== $date ) ? '</div>';
    return $html;

Read more here: Parse error: syntax error, unexpected ‘;’


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: