Title: Permalink error after update post
Last modified: September 24, 2018

---

# Permalink error after update post

 *  Resolved [hammouche](https://wordpress.org/support/users/hammouche/)
 * (@hammouche)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/permalink-error-after-update-post/)
 * Hello,
 * I have change my permalinks with the code :
 *     ```
       add_action("adverts_post_type", "customize_adverts_post_type");
       add_action("adverts_register_taxonomy", "customize_adverts_taxonomy");
   
       function customize_adverts_post_type( $args ) {
           if(!isset($args["rewrite"])) {
               $args["rewrite"] = array();
           }
   
           $args["rewrite"]["slug"] = "viap-community";
           return $args;
       }
   
       function customize_adverts_taxonomy( $args ) {
           if(!isset($args["rewrite"])) {
               $args["rewrite"] = array();
           }
   
           $args["rewrite"]["slug"] = "viap-categorie";
           return $args;
       }
       ```
   
 * My problem is when I update an post, all my link in wpadvert give me a 404 error,
   And it will repare when I manually upadate the permalinks of my website.
    Do 
   you have a solution? Thank
    -  This topic was modified 7 years, 8 months ago by [hammouche](https://wordpress.org/support/users/hammouche/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/permalink-error-after-update-post/#post-10720653)
 * Hi,
    after adding the code have you went to wp-admin / Settings / Permalinks 
   panel and clicked the “Save Changes” button to reset WP router and apply new 
   URL schemes? If not then you will need to do that.
 *  Thread Starter [hammouche](https://wordpress.org/support/users/hammouche/)
 * (@hammouche)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/permalink-error-after-update-post/#post-10721364)
 * Yes, I did and it’s work but this is not my problem.
 * My problem is that every time I update a post (advert or not) my custom permalink(
   taxonomy, post_type) don’t work anymore until I click again on the save change
   button in the setting/permalink page.
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/permalink-error-after-update-post/#post-10723976)
 * Hmm i am not sure, we never had similar problem before. One thing i noticed is
   that you are using an old or customized version of the custom slugs snippet.
 * In each function, you are missing an “if” statement at the beginning this might
   cause a conflict if you have more post types using adverts_post_type filter, 
   see here [https://github.com/simpliko/wpadverts-snippets/blob/master/custom-slugs/custom-slugs.php](https://github.com/simpliko/wpadverts-snippets/blob/master/custom-slugs/custom-slugs.php)
   how the function should look like.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Permalink error after update post’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/permalink-error-after-update-post/#post-10723976)
 * Status: resolved