Title: Rename Permalink
Last modified: February 8, 2021

---

# Rename Permalink

 *  Resolved [Vincenzo Stefanini](https://wordpress.org/support/users/vincenzost/)
 * (@vincenzost)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/rename-permalink/)
 * Hello,
 * Is there a way to rename the /ba_destinations permalink to something else like
   just “/destinations”?
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [bookingalgorithms](https://wordpress.org/support/users/bookingalgorithms/)
 * (@bookingalgorithms)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/rename-permalink/#post-14027873)
 * Hello,
 * You can try to use next code in your child theme functions.php. Note, that after
   adding the code you need to save permalinks from site dashboard to apply permalink
   changes.
 *     ```
       add_filter('ba_destinations_rewrite_rules', 'ba_destinations_rewrite_rules', 10, 1);
       function ba_destinations_rewrite_rules($rewrite_rules) {
   
           $taxonomy_slug = 'ba_destinations';
           $taxonomy_new_slug = 'destinations';
           $rewrite_rules = [];
   
           $rewrite_rules[$taxonomy_new_slug.'/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?'.$taxonomy_slug.'=$matches[1]&feed=$matches[2]';
           $rewrite_rules[$taxonomy_new_slug.'/([^/]+)/(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?'.$taxonomy_slug.'=$matches[1]&feed=$matches[2]';
           $rewrite_rules[$taxonomy_new_slug.'/([^/]+)/embed/?$'] = 'index.php?'.$taxonomy_slug.'=$matches[1]&embed=true';
           $rewrite_rules[$taxonomy_new_slug.'/([^/]+)/page/?([0-9]{1,})/?$'] = 'index.php?'.$taxonomy_slug.'=$matches[1]&paged=$matches[2]';
           $rewrite_rules[$taxonomy_new_slug.'/([^/]+)/?$'] = 'index.php?'.$taxonomy_slug.'=$matches[1]';
   
           return $rewrite_rules;
       }
   
       add_filter( 'term_link', 'ba_destinations_term_permalink', 10, 3 );
       function ba_destinations_term_permalink( $url, $term, $taxonomy ){
   
           $taxonomy_name = 'ba_destinations'; // your taxonomy name here
           $taxonomy_slug = 'ba_destinations'; // the taxonomy slug can be different with the taxonomy name
   
           // exit the function if taxonomy slug is not in URL
           if ( $taxonomy !== $taxonomy_name || strpos($url, $taxonomy_slug) === false ) {
               return $url;
           }
           $url = str_replace('/' . $taxonomy_slug, '/destinations', $url);
           return $url;
       }
       ```
   
 * —
    Best Regards, Booking Algorithms team

Viewing 1 replies (of 1 total)

The topic ‘Rename Permalink’ is closed to new replies.

 * ![](https://ps.w.org/ba-book-everything/assets/icon-256x256.png?rev=1850170)
 * [BA Book Everything](https://wordpress.org/plugins/ba-book-everything/)
 * [Support Threads](https://wordpress.org/support/plugin/ba-book-everything/)
 * [Active Topics](https://wordpress.org/support/plugin/ba-book-everything/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ba-book-everything/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ba-book-everything/reviews/)

## Tags

 * [link](https://wordpress.org/support/topic-tag/link/)
 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * 1 reply
 * 2 participants
 * Last reply from: [bookingalgorithms](https://wordpress.org/support/users/bookingalgorithms/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/rename-permalink/#post-14027873)
 * Status: resolved