I am just lately added this code to my WordPress web site so as to add .html for my product class. It labored okay with the class (http://mywebsite.com/parent-category/product-category.html) however once I clicked the pagination, the hyperlink changed into (http://mywebsite.com/parent-category/product-category.html/web page/2)
It is a code that i added to operate.php on my web site
operate wpse_178112_category_permastruct_html( $taxonomy, $object_type, $args ) {
if ( $taxonomy === 'product_cat' )
add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%.html", $args['rewrite'] );
}
add_action( 'registered_taxonomy', 'wpse_178112_category_permastruct_html', 10, 3 );
Please assist, I am only a WordPress beginner 😔.
Thanks!!!!!!!!!!