0
votes

I'm working on a Wordpress project with the Willow theme and I'm getting the following error

Parse error: syntax error, unexpected '<' in /nfs/c11/h03/mnt/201560/domains/theilocompany.com/html/wp-content/themes/willow/vc_extends/willow_service_block.php on line 6

the willow_service_block.php file looks like this:

    <?php

    class WPBakeryShortCode_VC_WILLOW_Service_Block extends WPBakeryShortCode{
    }

as you can see it only has 4 lines, but the error is on line 6, I'm new to php and now sure what to do, but it just broke the entire site!! please help!

1
The file has to have at min 6 lines. Do you think PHP just creates lines?! Are you sure you show us the right file from the right directory? - Rizier123
Please learn from this: use version control, and NEVER edit live production code. I need more info to be able to help. If it only has 4 lines, you aren't closing your php statement. you need ?> at the end of the file. - Brian Noah
@BrianNoah If it's only a php file then you don't necessarily have to close it - Rizier123

1 Answers

0
votes

you are using the keyword extends to extend the WPBakeryShortCode class. This is what we call a child class. A child class is basically a class that inherits all properties and methods of the class it’s extending.

Check WPBakeryShortCode class and close the PHP statement with ?>