Hi, how are you? 🙂
For more than 2h my site is having problems and it’s only working with twenty fifteen theme.
I tell you what happened.
I wanted to change a little thing from a premium plugin called The Event Calendar.
The developer of this plugin, said me to paste the following code to function.php
<?php
// Singular
add_filter( ‘tribe_event_label_singular’, ‘event_display_name’ );
function event_display_name() {
return ‘Meeting’;
}
add_filter( ‘tribe_event_label_singular_lowercase’, ‘event_display_name_lowercase’ );
function event_display_name_lowercase() {
return ‘meeting’;
}
// Plural
add_filter( ‘tribe_event_label_plural’, ‘event_display_name_plural’ );
function event_display_name_plural() {
return ‘Meetings’;
}
add_filter( ‘tribe_event_label_plural_lowercase’, ‘event_display_name_plural_lowercase’ );
function event_display_name_plural_lowercase() {
return ‘meetings’;
}
As soon as I copied this code in the fuction.php, the site fell down, and it appeared this error:
Parse error: syntax error, unexpected ‘;’ in /home/brunohm/public_html/wp-content/themes/Newspaper/functions.php on line 166
As I neither could open my wp-admin page, I had to contact my hosting support. They only helped me to make the site at list work again with the default theme of WP. And of course we deleted the plugin.But nothing.
They didn’t find the code that I pasted in the Cpanel. So I had to enter and, first of all I had to activate again the Newspaper Theme, and then I found function.php.
So I delete the code, but then saving. The page was not working, it appeared a white page saying. Newspaper does not exist.
So nothing, again the support of the hosting changed to twenty fifteen, and now it works but horrible.
SO I BEG YOU, PLEASE HELP ME 🙂
Hello,
It seems you have to delete the newspaper theme from your server using ftp and install it again. Please use this guide and choose the ftp method: https://forum.tagdiv.com/how-to-update-the-theme-2/
FTP is the safest way of updating and replacing theme files. Once you access make sure you delete the entire newspaper folder so there will be no files remaining. Then copy over the new theme files you download from envato. I hope this helps.
Thank you!
Hi Bogdan.
I deleted and then re installed the theme via FTP sucesfully.
But having activated twenty fifteen, I went to themes, in WP, and I can’t enter, it shows me this error:
Parse error: syntax error, unexpected end of file in /home/brunohm/public_html/wp-content/themes/Newspaper/functions.php on line 158
I don’t know what to do.
I can give you access to my WP admin and my C Panel. Because I don’t know, I tried all I can, but I can’t use Newspaper 🙁
Thank you
Hello again,
Happy to say the theme is working finally.
This issue started when I wanted to change something of the premium plugin called The Event Calendar, I just wanted to change the word Event to Bdays… So the developer said me to paste a code to function.php
When I did this,booom, Parse error: syntax error, unexpected end of file in /home/brunohm/public_html/wp-content/themes/Newspaper/functions.php on line 158
So that means the plugin was causing something to the theme. Am I correct?
Thank you
Hi,
Yes, that could be the cause of the issue. And you have caching installed so only after the cache was cleared were you able to see the results. Glad it is solved, and try to make modifications and tests on a sub-domain first before altering the live site.
Thank you!