Home › Forums › Haste Theme › Fatal error after trying to rename Portfolio
Home › Forums › Haste Theme › Fatal error after trying to rename Portfolio
Hi, I tried to rename Portfolio section.
And so I went to /wp-content/themes/haste/inc/api/portfolio.php
In this file i changed
public function get_title() {
return esc_attr__( ‘Portfolio’, ‘haste’ );
}
to
public function get_title() {
return esc_attr__( ‘Case Studies’, ‘haste’ );
}
And now the whole website doesn’t work, even after I changed it back.
<b>Fatal error</b>: Uncaught Error: Class ‘Elementor\Widget_Base’ not found in /data/web/virtuals/320233/virtual/www/wp-content/themes/haste/inc/api/portfolio.php:17 Stack trace: #0 /data/web/virtuals/320233/virtual/www/wp-content/themes/haste/inc/init.php(91): require_once() #1 /data/web/virtuals/320233/virtual/www/wp-content/themes/haste/functions.php(6): require_once(‘/data/web/virtu…’) #2 /data/web/virtuals/320233/virtual/www/wp-settings.php(591): include(‘/data/web/virtu…’) #3 /data/web/virtuals/320233/virtual/www/wp-config.php(96): require_once(‘/data/web/virtu…’) #4 /data/web/virtuals/320233/virtual/www/wp-load.php(50): require_once(‘/data/web/virtu…’) #5 /data/web/virtuals/320233/virtual/www/wp-blog-header.php(13): require_once(‘/data/web/virtu…’) #6 /data/web/virtuals/320233/virtual/www/index.php(17): require(‘/data/web/virtu…’) #7 {main} thrown in <b>/data/web/virtuals/320233/virtual/www/wp-content/themes/haste/inc/api/portfolio.php</b> on line <b>17</b>
It shows me this error. Please How Can I Fix This. I’ll sell my soul for the solution.
Hello,
I’m sorry to hear that you’re having trouble with your WordPress website. As you’ve experienced, directly modifying theme files can sometimes lead to complications or even cause your site to stop functioning. Fortunately, using a tool like the Loco Translate WordPress plugin can help avoid such issues by providing a safer way to make text changes.
Here’s a step-by-step guide on how to rename the “Portfolio” section to “Case Studies” using Loco Translate:
Please remember, it’s generally best to avoid modifying theme or plugin files directly. Such changes can easily be overwritten during updates, and as you’ve seen, they can sometimes cause your site to malfunction. Using a translation plugin like Loco Translate can provide a safer, more sustainable way to customize your site’s text.
I hope this helps! Let me know if you have any further questions.
Best regards,
Shufflehound team
Thank you very much, I will do that. But how can I make my website working again? This is the weird part. When I change it back to what it was in the file it’s still broken.
And changing
public function get_title() {
return esc_attr__( ‘Case Studies’, ‘haste’ );
}
back to
And changing
public function get_title() {
return esc_attr__( ‘Portfolio’, ‘haste’ );
}
doesn’t really help. Do you have any ideas please?