WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type Permalinks
.html extension in the url on product category view (1 post)

  1. Grávuj Miklós Henrich
    Member
    Posted 11 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by Grávuj Miklós Henrich
  • This topic is not resolved
  • WordPress version: 3.5.2

Tags

No tags yet.