Ecommerce Shopify WordPress Discussion

PHP Parse error: syntax error, unexpected end of file in header.php

When opening a portal on WordPress, an error appears in the header.php file - syntax error, unexpected end of file in header.php . I tried changing the code and leaving only the header in the condition, but that didn't help either. Relevant code: <?php if (get_field('is_header_absolute_position')) { ?> <header class="position_absolute"> <?php } else { ?> <header> <?php } ?> <div class="container"> <div class="header__wrap"> <?php if (pll_current_language('slug') == "en") { ?> <?php $logo = get_field('logo_en', 'option'); if( !empty($logo) ): ?> <a href="/en/" class="logo_wrap"> <img src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>"> </a> <?php endif; ?> <?php } else { ?> <?php $logo = get_field('logo', 'option'); if( !empty($logo) ): ?> <a href="/" class="logo_wrap"> <img src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>"> </a> <?php endif; ?> <?php } ?> <nav class="menu head_menu"> <?php if (pll_current_language('slug') == "en") { ?> <?php wp_nav_menu( array('menu' => 'header_menu_eng', 'menu_class'=>'', 'container' => 'ul')); ?> <?php } else { ?> <?php wp_nav_menu( array('menu' => 'header_menu', 'menu_class'=>'', 'container' => 'ul')); ?> <?php } ?> </nav> <nav class="menu mobile_menu"> <?php if (pll_current_language('slug') == "en") { ?> <?php wp_nav_menu( array('menu' => 'header_menu_eng', 'menu_class'=>'', 'container' => 'ul')); ?> <?php } else { ?> <?php wp_nav_menu( array('menu' => 'header_menu', 'menu_class'=>'', 'container' => 'ul')); ?> <?php } ?> </nav> <button class="toggle_mnu"> <?php if (pll_current_language('slug') == "en") { ?> <?php if (get_field('mobile_menu_text_en', 'option')) { ?> <span class="toggle_mnu_text"><?php the_field('mobile_menu_text_en', 'option'); ?></span> <?php } ?> <?php } else { ?> <?php if (get_field('mobile_menu_text', 'option')) { ?> <span class="toggle_mnu_text"><?php the_field('mobile_menu_text', 'option'); ?></span> <?php } ?> <?php } ?> <span class="sandwich"> <span class="sw-topper"></span> <span class="sw-bottom"></span> <span class="sw-footer"></span> </span> </button> </div> </div> </header> <-Here it says that there is an error. This is the end of the file I tried to find a solution, but I couldn’t find one that fits this
It seems you are not using right PHP blocks. Just try with a simple test Try like this, I have tested at my end and it worked fine Click on this image to get code

February 4, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.