WordPress.org

Forums

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

  1. Gravuj Miklos Henrich
    Member
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type Permalinks
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Gravuj Miklos Henrich
  • This topic is not resolved
  • WordPress version: 3.5.2

Tags

No tags yet.