Home Page › Forums › Porto | Multi-Purpose & WooCommerce Theme › Product tag breadcrumb issue
- This topic has 3 replies, 3 voices, and was last updated 2 years, 4 months ago by
marianogi.
-
AuthorPosts
-
April 21, 2023 at 11:08 am #880
Hi,
For the product tag listing Porto has its own (arbitrary) breadcrumb text that I want to change. It is formatted this way:
"<li>" . esc_html__( "Product Tag", "porto" ) . " - %s</li>"
And I only want:
"<li>%s</li>"
I have been struggling in the old support system for more than two weeks with this. I think this is unacceptable. I proposed two logical solutions:
1. Add
" - %s"
as a translatable string, or even the whole string like:
"<li>" . esc_html__( "Product Tag - %s", "porto" ) . "</li>"
2. Tell me how to override that code with my child theme.
You only offered me an unacceptable jquery replace string, which is embarrassingly inefficient and unprofessional.
Please I need a professional solution to this simple(!!) issue.
My ticket in older platform: https://p-themes.zendesk.com/hc/en-us/requests/20156
This field is Private Content.
April 21, 2023 at 1:45 pm #883Hello.
I am a contributor of Porto WordPress Theme.Please add a new function(porto_custom_breadcrumb) to the apply_filter hook – ‘porto_breadcrumbs’.
Next, you should copy the content of the porto_breadcrumbs function to porto_custom_breadcrumb function and edit the code you want to override.Please try the below code.
add_filter( 'porto_breadcrumbs', 'porto_custom_breadcrumb' );
function porto_custom_breadcrumb( $output ) {
/** Code of Porto_breadcrumbs function **/
$output .= sprintf( "<li>" . esc_html__( "Product Tag", "porto" ) . " - %s</li>", $html );=>
$output .= sprintf( "<li>" . esc_html__( "Product Tag", "porto" ) . '%s'</li>', $html );
/** Code of Porto_breadcrumbs function **/
return $output;
}
-
This reply was modified 2 years, 4 months ago by
Lodrigo Jan.
-
This reply was modified 2 years, 4 months ago by
Lodrigo Jan.
-
This reply was modified 2 years, 4 months ago by
Alex.
-
This reply was modified 2 years, 4 months ago by
Alex.
-
This reply was modified 2 years, 4 months ago by
Alex.
Attachments:
You must be logged in to view attached files.April 21, 2023 at 2:41 pm #892Hello. @Mariano
Sorry for the late reply.With the lodrigo’s reply, I have already fixed your issue on your site.
Please verify your site.Sorry again.
Best Regards.April 26, 2023 at 10:20 am #921Thank you very much, it worked great!
-
This reply was modified 2 years, 4 months ago by
-
AuthorPosts
- The topic ‘Product tag breadcrumb issue’ is closed to new replies.