PHP opening tag showing inside html


I am facing an issue with PHP opening tags. The opening tag is displayed at the starting of the file. Here is the screenshot of the source code.
enter image description here

Here is the code I use. I registered the template through the plugin. I followed this tutorial for adding the templates with the plugin.

 * Template Name: Customer

if ( ! is_user_logged_in() ) {
    wp_redirect( homer_url());

<!DOCTYPE html>
<html class="ud-for-edd-template">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php wp_head() ?>

I am not sure why this happens. Why the opening tag is showing before html?

Thanks in advance.

Raashid Din 1 month 0 Answers 11 views 0

Leave an answer