Public Ticket #1202233
URL Structure


  • Pierre started the conversation

    Hello Pasquale,

    I'd like to change in the url structure "room" ! I think 've noticed the file, it's in Hemma Custom Post Type plugin, then admin, then class-hemma-custom-post-types-admin.php

    I'd like to change the structure and use another word for room (I'm gonna use the word : "chambre-d-hotes" that is "guest room" in french and will help SEO of the website.

    Where and what do I have to change ? I think it's gonna be Line 127 :     'rewrite' => array( 'slug' => 'room-category' ),

    And last question, once it will be changed , will it disappear if the plugin is updated ? 

  •  106
    Pasquale replied

    Hi Pierre,

    I'd recommend that you don't change plugins files or you could lose changes on updates. Please have a look at this code: https://github.com/pasqualevitiello/Hemma-Change-Custom-Post-Types-names 

    There I am describing how to replace 'room' with anything else at your choice (e.g. 'villa').

    Cheers, P.

  • Pierre replied

    Awesome ! Really easy, I just had to copy paste your text and change replace villa and villas in my text editor !

    Thanks Pasquale !

  •  106
    Pasquale replied

    You're welcome!