Answer the question
In order to leave comments, you need to log in
how to change html class in wordpress
Good afternoon,
I am making an online store on wordpress and it became necessary to make 1 category per line, while leaving 4 products per line inside the category. The standard tool changes both categories and products at once (pictured).
Tried to replace columns-4 class with columns-1 via javascript but nothing changes. When changing the class manually through devtools, everything works.
Thank you in advance.
Answer the question
In order to leave comments, you need to log in
jQuery
$('.product').removeClass('columns-4');
$('.product').addClass('columns-1);
+ see if the script is connected on the page
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question