Parse error: syntax error, in line 243
-
Hi
I was trying to change number of products per row from 4 to 1.
I found a helpful thread and followed instructions to look for a specific code to edit or add a specific code, if it didn’t exist. Since I couldn’t find it, I added the code in custom woocommerce css, at the end:
add_filter(‘loop_shop_columns’, ‘loop_columns’);if (!function_exists(‘loop_columns’)) {
functionloop_columns() {
return 1; // 1 products per row
}
}
As in instructed From:
https://www.themelocation.com/how-to-change-number-of-products-per-row-in-products-page/It didn’t work, so I removed it again, however on updating the file I got the following:
Parse error: syntax error, unexpected ‘{‘ in /var/www/lenebay.dk/public_html/wp-content/themes/virtue/lib/custom-woocommerce.php on line 243Line 243 is a blank line between the following:
if (!function_exists(‘loop_columns’)) {functionloop_columns() {
No matter what I do now, the same error comes up and I’m unable to view any of my pages, dashboard or anything… In case I miscalculated I changed it to:
if (!function_exists(‘loop_columns’)) {functionloop_columns(1) {
I reeeaaally hope one of you have some wise words to recover my work!As I’m at my wits end…. I really din’t understand how the error can still be in place, when the line doesn’t exist…
Big thanks in advance
Liv
- The topic ‘Parse error: syntax error, in line 243’ is closed to new replies.