Appendix .html at the end of the reference to Wordpress



  • Add .html at the end of the reference Wordpress?

    What's that? /workers/proekty

    What would you like: /workers/proekty.html

    I know. Wordpress yes add_rewrite_ruleand how it should be connected:

    add_action( 'init', 'callback_rewrite' );
    

    But how completely I can't understand.



  • add_action('init', 'rewrite_rule_my');
    function rewrite_rule_my(){
    add_rewrite_tag('%pagetype%', '([^&]+)');
    add_rewrite_rule('^(sitemap)/([^/]*)/?', 'index.php?pagename=$matches[1]&pagetype=$matches[2]', 'top');
    }
    

    Found a piece of the code, I think we can rewrite it.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2