Parse error: syntax error, unexpected (T_STRING) In WordPress : How I Solved It

·

Yesterday, a client requested I add a woocommerce slider to her ecommerce site. I installed the free woocommerce product slider plugin but after inserting it’s shortcode in a WordPress theme file, the site became inaccessible.

web design wordpress parse syntax error

Whenever I try accessing any of the pages of the website, I get the error below:

Parse error: syntax error, unexpected ‘Feature’ (T_STRING) in /home4/wac2pi0abqbi/public_html/wp-content/themes/netdivoflexchild/index.php on line 2

After googling it, I discovered that the error was thrown because of the use of ” instead of ‘ in the shortcode below:

<?php echo do_shortcode(“[wpb-feature-product title=Feature Products]”); ?>

The error was fixed by using the shortcode below, instead of the one above.


<?php echo do_shortcode(“[wpb-latest-product title=Feature Products]”); ?>

So, if you encounter similar error, try using ‘ instead of ” in your code.

Please Share :

Like What You Read?

Sign Up to get similar articles delivered to your email inbox.

Leave a Reply

Your email address will not be published. Required fields are marked *

One response to “Parse error: syntax error, unexpected (T_STRING) In WordPress : How I Solved It”

  1. Adesoji Awobajo Avatar

    Wow! Cool sir thanks for the Tip.. Commenting from Safaxnet.com

Search

Copyright © 2025 | About | Advertise | Privacy Policy | Proudly powered by WordPress