Title: Slug Change
Last modified: August 22, 2016

---

# Slug Change

 *  Resolved [Alan](https://wordpress.org/support/users/arr/)
 * (@arr)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/)
 * Hi
 * First of all, thanks for the awesome plug-in!
 * Secondly, I was wondering if it is possible to change the default slug used for
   individual posts? My main FAQ page is located under support/faq and I would like
   the permalink for individual faq posts (as returned by search etc) to be of the
   format support/faq/my-test-faq.
 * As a first stab I tried adding the following function to re-write the slug from
   just faq to faqtest…
 *     ```
       add_filter( 'arconix_faq_defaults', 'my_faqslug_rewrite' );
       function my_faqslug_rewrite( $defaults ) {
         $defaults['post_type']['args']['rewrite']['slug'] = 'faqtest';
         return $defaults;
       }
       ```
   
 * A search now returns the expected URL for faqs e.g. faqtest/my-test-faq instead
   of faq/my-test-faq but if I click on the link I get a 404 Page Not Found error.
   I have tried creating new faxes to see if it was an issue with existing links
   but still get the 404 error.
 * I’m a novice to WordPress so any advice would be greatly appreciated!
 * Thanks
 * Alan
 * [https://wordpress.org/plugins/arconix-faq/](https://wordpress.org/plugins/arconix-faq/)

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

 *  Plugin Author [John Gardner](https://wordpress.org/support/users/jgardner03/)
 * (@jgardner03)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/#post-5331097)
 * Hi Alan,
 * Thanks for using my plugin and for the kind words. I also have to apologize for
   incomplete documentation for editing the rewrite slug. Your code for the slug
   is accurate, but incomplete. The `'has_archive'` argument must also be set to`
   true`.
 *     ```
       add_filter( 'arconix_faq_defaults', 'my_faqslug_rewrite' );
       function my_faqslug_rewrite( $defaults ) {
           $defaults['post_type']['args']['rewrite']['slug'] = 'faqtest';
           $defaults['post_type']['args']['has_archive'] = true;
   
           return $defaults;
       }
       ```
   
 * Then you go to Settings -> Permalinks and scroll to the bottom and click ‘Save
   Changes’. That will cause WordPress to refresh your permalinks and the slug should
   start working. If you change the slug, you have to re-save the permalinks to 
   see the changes.
 *  Thread Starter [Alan](https://wordpress.org/support/users/arr/)
 * (@arr)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/#post-5331098)
 * Nice one John! Thanks for the prompt reply (it seems so easy when you know how)
   and thanks again for a great plugin!
 * Alan
 *  Thread Starter [Alan](https://wordpress.org/support/users/arr/)
 * (@arr)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/#post-5331099)
 * One slight quirk to this…
 * My site originally had my custom FAQ page (using your shortcodes) located at 
   domain.com/support/faq. I wanted the single page versions of faqs to show up 
   as domain.com/support/faq/my-faq-1 etc. I edited teh rewrite you kindly posted
   above to make the new slug “support/faq”. That works great in that the single
   faqs are now seen as domain.com/support/faq/my-faq-1 just as I wanted. The problem
   now is that if I go to my original FAQ URL at domain.com/support/faq I now see
   what I resume is the archives page rather than my custom FAQ page. Is there some
   way to overcome this?
 * Thanks again
 * Alan
 *  Plugin Author [John Gardner](https://wordpress.org/support/users/jgardner03/)
 * (@jgardner03)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/#post-5331168)
 * You are correct in that you’ll see the post_type archive instead of your FAQ 
   page. As far as I’m aware of there’s no way around this because it’s what you’ve
   told WordPress to do. In order to get the rewrite working you had to enable the
   post_type archive, and you’ve established the post_type archive is located at`
   support/faq`.
 *  Thread Starter [Alan](https://wordpress.org/support/users/arr/)
 * (@arr)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/#post-5331184)
 * Ah OK thanks John. I’ll tinker away and see if I can come up with any ideas. 
   Maybe there is a way to design a custom archive page or some-such.
 * Thanks anyway
 * Alan

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

The topic ‘Slug Change’ is closed to new replies.

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

 * 5 replies
 * 2 participants
 * Last reply from: [Alan](https://wordpress.org/support/users/arr/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/slug-change/#post-5331184)
 * Status: resolved