Title: remove the anchor link
Last modified: November 7, 2017

---

# remove the anchor link

 *  Resolved [Byron Hasegawa](https://wordpress.org/support/users/byron222/)
 * (@byron222)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/remove-the-anchor-link/)
 * I want to remove the anchor link when I jump to another page changing the select
   of the filter form.
 * Ex)
    [https://test.com/office/area/tokyo/genre/animal/#anchor1](https://test.com/office/area/tokyo/genre/animal/#anchor1)
 * then, when I select another AREA(paris) and jump to that page, the anchor still
   there….like
 * Ex result)
    [https://test.com/office/area/paris/genre/animal/#anchor1](https://test.com/office/area/paris/genre/animal/#anchor1)
 * I want to remove the anchor when I jump to another page.
 *     ```
       This is what I want
       https://test.com/office/area/tokyo/genre/animal/#anchor1
       ↓
       https://test.com/office/area/paris/genre/animal/
       ```
   
 * Now I using this code to jump when I change my select form.
 *     ```
       $('.beautiful-taxonomy-filters-select').change(function(){
            $(this).closest('#beautiful-taxonomy-filters-form').submit();		
       });
       ```
   
 * I try this but, remove the anchor and still in the same page…
 *     ```
       if(location.hash){
           location.href = location.href.replace(/#.*/, "");
       }
       ```
   
 * What can I do?
    -  This topic was modified 8 years, 6 months ago by [Byron Hasegawa](https://wordpress.org/support/users/byron222/).
    -  This topic was modified 8 years, 6 months ago by [Byron Hasegawa](https://wordpress.org/support/users/byron222/).

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

 *  Thread Starter [Byron Hasegawa](https://wordpress.org/support/users/byron222/)
 * (@byron222)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/remove-the-anchor-link/#post-9669092)
 * Please, I need this…
 * If is difficult, I will try another way.
 *  Plugin Author [Jonathandejong](https://wordpress.org/support/users/jonathandejong/)
 * (@jonathandejong)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/remove-the-anchor-link/#post-9669162)
 * Hi Byron,
 * Please be aware that this supportforum is free *and* only in regards to BTF functionality.
   If you need help with all sorts of stuff and need a fast answer you are probably
   better off asking at stackoverflow 🙂
 * As for the hash you should look into `window.history.pushState`.
 * Something like:
 *     ```
       $('.beautiful-taxonomy-filters-select').change(function(){
            window.history.pushState("", document.title, window.location.pathname);
            $(this).closest('#beautiful-taxonomy-filters-form').submit();		
       });
       ```
   
 * might work.
 *  Thread Starter [Byron Hasegawa](https://wordpress.org/support/users/byron222/)
 * (@byron222)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/remove-the-anchor-link/#post-9692218)
 * Roger!!
 * Thank you very much!
 * Was perfect to my site!!

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

The topic ‘remove the anchor link’ is closed to new replies.

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

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Byron Hasegawa](https://wordpress.org/support/users/byron222/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/remove-the-anchor-link/#post-9692218)
 * Status: resolved