Home / Forums / WoodMart support forum / Sidecart title “Carrito” needs to not be a h2
Home › Forums › WoodMart support forum › Sidecart title “Carrito” needs to not be a h2
Sidecart title “Carrito” needs to not be a h2
- This topic has 9 replies, 2 voices, and was last updated 1 week, 1 day ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
October 27, 2025 at 5:12 pm #693025
seo-0882ParticipantHi, the cart title is an h2 and I need it to be an span or not a title. How can I get that?
Also the texto is not alligned to the left,, how can it be fixed?
Attachments:
You must be logged in to view attached files.October 28, 2025 at 8:27 am #693088
Aizaz Imtiaz AwanKeymasterHello,
Sorry to say, there are no direct options in theme settings available for that.
You find it in the file
woocommerce/cart/mini-cart.phpYou need to edit the theme files for this. All the customizations made in the theme files are at your own risk.
Best Regards,
October 28, 2025 at 10:24 am #693103
seo-0882ParticipantI don´t see where I can change the h2 to a span in the code… Can you help me?
October 28, 2025 at 11:20 am #693127
seo-0882ParticipantAlso the demo was with the text of the min cart not being an h2, and alligned at the left, it should be like that, cause i didnt change anything,,,,
Attachments:
You must be logged in to view attached files.October 28, 2025 at 12:02 pm #693139
Aizaz Imtiaz AwanKeymasterHello,
Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.
Best Regards,
October 28, 2025 at 12:13 pm #693144
seo-0882ParticipantAttached. Thanks and tell me the steps you Will follow pls
October 28, 2025 at 2:13 pm #693172
Aizaz Imtiaz AwanKeymasterHello,
Please try to deactivate the “Code Snippets” plugin on your site and check the issue after completely clearing the cache.
Best Regards,
October 28, 2025 at 3:13 pm #693187
seo-0882Participantdone, but the unique code i had there i put it on the child theme in functions and still not working: this is the code I have that i need for size guides part: // En functions.php del child theme o en Code Snippets
add_action( ‘wp_enqueue_scripts’, ‘jc_replace_wd_heading_to_h2’ );
function jc_replace_wd_heading_to_h2() {
// Registramos un “handle” válido para añadir el inline script
wp_register_script( ‘jc-wd-heading’, false, [], null, true );
wp_enqueue_script( ‘jc-wd-heading’ );$js = <<<‘JS’
(function(){
function replaceHeading(el){
if(!el) return;
var title = el.querySelector(‘.title’);
if(title && title.tagName.toLowerCase() !== ‘h2’){
var h2 = document.createElement(‘h2’);
h2.className = ‘wd-heading-title’;
h2.innerHTML = title.innerHTML;// Reemplaza el span.title por el nuevo h2
title.parentNode.replaceChild(h2, title);// Conserva el botón de cierre si existe (ya estará dentro del mismo .wd-heading)
var closeBtn = el.querySelector(‘.close-side-hidden’);
if(closeBtn) el.appendChild(closeBtn);// Añade una clase para posibles estilos específicos
el.classList.add(‘wd-heading–h2’);
}
}document.addEventListener(‘DOMContentLoaded’, function(){
document.querySelectorAll(‘.wd-heading’).forEach(replaceHeading);
});
})();
JS;
// Añadimos el script en línea al handle registrado
wp_add_inline_script( ‘jc-wd-heading’, $js );
}October 28, 2025 at 3:25 pm #693191
seo-0882Participantsorry, i need this code to have the product labels titles as h2, like description etc…
Is it a way to just aply it to them, and not the cart title?:
// En functions.php del child theme o en Code Snippets
add_action( ‘wp_enqueue_scripts’, ‘jc_replace_wd_heading_to_h2’ );
function jc_replace_wd_heading_to_h2() {
// Registramos un “handle” válido para añadir el inline script
wp_register_script( ‘jc-wd-heading’, false, [], null, true );
wp_enqueue_script( ‘jc-wd-heading’ );$js = <<<‘JS’
(function(){
function replaceHeading(el){
if(!el) return;
var title = el.querySelector(‘.title’);
if(title && title.tagName.toLowerCase() !== ‘h2’){
var h2 = document.createElement(‘h2’);
h2.className = ‘wd-heading-title’;
h2.innerHTML = title.innerHTML;// Reemplaza el span.title por el nuevo h2
title.parentNode.replaceChild(h2, title);// Conserva el botón de cierre si existe (ya estará dentro del mismo .wd-heading)
var closeBtn = el.querySelector(‘.close-side-hidden’);
if(closeBtn) el.appendChild(closeBtn);// Añade una clase para posibles estilos específicos
el.classList.add(‘wd-heading–h2’);
}
}document.addEventListener(‘DOMContentLoaded’, function(){
document.querySelectorAll(‘.wd-heading’).forEach(replaceHeading);
});
})();
JS;
// Añadimos el script en línea al handle registrado
wp_add_inline_script( ‘jc-wd-heading’, $js );
}October 28, 2025 at 3:34 pm #693196
Aizaz Imtiaz AwanKeymasterHello,
Sorry to say, it requires customization and is beyond our support policy. Additional code customizations in theme files are out of our theme support scope.
Hope you can understand!
Best Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register