Title: Set_permalink_structure after setup theme translate
Last modified: October 24, 2022

---

# Set_permalink_structure after setup theme translate

 *  [Jonathan](https://wordpress.org/support/users/johnccg/)
 * (@johnccg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/set_permalink_structure-after-setup-theme-translate/)
 * Hi there,
 * When i activate my theme :
    - I create home page
    - I create news liste page
    - i create 2 different language with pll_admin_model $model->add_language ($
      args)
    - I set the two pages as static and blog page
 * I would like to rewrite the permalink structure as :
    - /A-WORD/%category%/%postname%/ for fr_FR
    - /A-WORD-TRANSLATED/%category%/%postname%/ for en_EN
 * For this i thought use :
 *     ```
       add_action( 'after_setup_theme', '_reset_permalinks' );
       function reset_permalinks() {
           global $wp_rewrite;
           $wp_rewrite->set_permalink_structure('/%category%/%postname%/');
           $wp_rewrite->flush_rules();
       }
       ```
   
 * But how can i put the A-WORD and the translation before the /%category%/
 * Thank you so much for your help
    Jo
    -  This topic was modified 3 years, 6 months ago by [Jonathan](https://wordpress.org/support/users/johnccg/).

The topic ‘Set_permalink_structure after setup theme translate’ is closed to new
replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Jonathan](https://wordpress.org/support/users/johnccg/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/set_permalink_structure-after-setup-theme-translate/)
 * Status: not resolved