Support » Plugin: Custom Post Type Permalinks » .html extension in the url on product category view

  • Hi,

    I have the .html extension on product view. This was very simple to achieve by made the right setting on the “Permalink Setting for custom post type” section by inserting /%postname%.html rule for the “product” post type.

    I would like to have to have the .html extension also when viewing a product category.

    I have commented out the code from line 557 to 559 and replaced with the next one:

    $termlink = str_replace( $wp_home, $wp_home, $termlink );
    $str = rtrim( preg_replace("/%[a-z_]*%/","",get_option("permalink_structure")) ,'/');//remove with front
    return str_replace($str, "", $termlink.'.html' );

    On the menu I’m having the product category like http://www.mydomain.com/product-category/category-name.html but when accessing it gives me a 404.

    http://wordpress.org/plugins/custom-post-type-permalinks/

  • The topic ‘.html extension in the url on product category view’ is closed to new replies.