Rename Portfolio

Hi,

We have gone through Forum but did not find the solution to rename the portfolio as desired.

We need to Rename the Portfolio as “Testimonials” and use the feature of portfolio as Testimonials. Also need to rename the slug “portfolio-item” as “testimonial-item”. We tried to rename the slug but it created Error 404: Page not found, from the Breadcrumb.

We have used " Yoast SEO" to display Breadcrumb at our website. Please see the attached screenshots.

Example link:
https://www.hamroshringar.com/portfolio-item/bibhash-karn/



Hoping for the solutions.

Thank You,
Bibhash

Hi Bibhash,

Unfortunately, there is no option to rename the Portfolio to Testimonial, but you can change the slug from the Theme Options > Portfolio > Custom URL Slug as shown in the given screenshot.

Hope it helps.
Thanks

Hi,

Thank you for your response.

Sorry to know that there is no option to rename Portfolio to Testimonial .

Changing the slug as mentioned above generate the Error 404: Page not found to the Portfolio category. So please let us know how to fix this.

Thank you

Hi Bibhash,

Please try resetting the Permalink to %postname% from Settings > Permalink after renaming the slug.

Hope it helps.
Thanks

Hi,

Thank you for your response.

Already tried as mentioned above. Also deleted older .htaccess and then created new .htaccess as mentioned above. But the issue remained same. We have also purged all cache from the website and had look but there exist same issue.

Hoping for the solution.

Thank You.

Hi Bibhash,

Flushing the permalink settings should work, if that is not working we need to investigate it through the WordPress admin dashboard. I would suggest you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi,

Thank you for your response.

As per your suggestion, Flushing the permalink did not worked so please see secure note for the

– WordPress Site URL & Login URL
– WordPress Admin username/password

Please see the link at the Breadcrumb for the Error 404: Page not found

https://www.hamroshringar.com/testimonial-item/bibhash-karn/

Thank You

Hi Bibhash,

I have checked all the Portfolio items including the link given in your last reply and it is working perfectly fine with the update slug.

Thanks

Hi,

Thank you for your response.

It’s true, the link are updated and visible in slug too but the issue is when you click at the portfolio category “Review at Google” at the Breadcrumb. On click at the portfolio category “Review at Google” on the Breadcrumb there is Error 404: Page not found as this link let to below link that does not exist.

https://www.hamroshringar.com/portfolio-item-category/review-at-google/

Thank You.

Hi Bibhash,

I have checked the breadcrumb and found that it is coming from the [wpseo_breadcrumb] shortcode, which has not been updating the category URL. I have checked the category and found that it is working with the following link.

https://www.hamroshringar.com/testimonial-item-category/review-at-google/

I would suggest you contact the Plugin Author so that the updated category slug URL is not replaced.
Thanks

Hi,

Thank you for your response.

it’s true, the breadcrumb is displayed via [wpseo_breadcrumb] shortcode from the plugin Yoast SEO.

The portfolio category link from portfolio’s post is working fine. Just the link at breadcrumb is not working.

We will go through the Plugin Author as per your suggestion and will update you if any further support is required in this matter.

Thank You

Hi,

While going through Yoast SEO’s support, we found below links that helped us to update our link at breadcrumb.

Plugin: https://wordpress.org/plugins/yoast-test-helper/
Support: https://wordpress.org/support/topic/yoast-breadcrumb-category-not-updating/

Thank You

Hello Bibhash,

I have checked the testimonial item an it is now showing on my end.

If you still want to change the “Portfolio” to “Testimonial” in the breadcrumb or anywhere else, perhaps the you can use the gettext() function to be able to change the output text. Please check out this old threads instead as a reference:

Best Regards.

Hi,

Thank you for your response.

Yes, we want to change the text “Portfolio” to “Testimonial". Thank you for the references and link. With the help of your link, we used below code:

function change_text($translated) { 
$translated = str_ireplace('Testimonial', 'Portfolio', $translated);
return $translated; 
}
add_filter('gettext', 'change_text');

But we were unable to change the text as desired. With the above code no things changed at our end. So hoping for the solution in this matter too.

Thank You.

Hello Bibhash,

You had it incorrectly. It should be:

function change_text($translated) { 
  $translated = str_ireplace('Portfolio', 'Testimonial',  $translated);
  return $translated; 
}
add_filter('gettext', 'change_text', 1);

And then please make sure that the title of the page that uses the Layout - Portfolio page template is “Testimonial” so that it displays properly in the breadcrumbs.

Best Regards.

Hi,

Thank you for your response.

Thank you for the above corrected code. Great, it helped us to achieve as per desired but it worked only after the reset of “Reset indexables tables & migrations options” with the below plugin and support as mentioned earlier in my above post. Our breadcrumb is displayed via [wpseo_breadcrumb] shortcode from the plugin Yoast SEO .

Plugin: https://wordpress.org/plugins/yoast-test-helper/
Support: https://wordpress.org/support/topic/yoast-breadcrumb-category-not-updating/

Thank You,
Best Regards.

You are most welcome.

1 Like