+
diff --git a/src/js/event-bus-search.js b/src/js/event-bus-search.js
index 30e1fb63e..967d933fe 100644
--- a/src/js/event-bus-search.js
+++ b/src/js/event-bus-search.js
@@ -323,6 +323,12 @@ export default {
},
setCollectionId(collectionId) {
this.collectionId = collectionId;
+ },
+ clearAllFilters() {
+ this.$store.dispatch('search/cleanFilterTags');
+ this.$store.dispatch('search/cleanMetaQueries');
+ this.$store.dispatch('search/cleanTaxQueries');
+ this.updateURLQueries();
},
/* Dev interfaces methods */
diff --git a/src/js/store/modules/search/actions.js b/src/js/store/modules/search/actions.js
index 27d1c5810..9c4e83f85 100644
--- a/src/js/store/modules/search/actions.js
+++ b/src/js/store/modules/search/actions.js
@@ -127,3 +127,11 @@ export const removeFilterTag = ( { commit }, filterTag ) => {
export const cleanFilterTags = ( { commit } ) => {
commit('cleanFilterTags');
};
+
+export const cleanMetaQueries = ( { commit } ) => {
+ commit('cleanMetaQueries');
+};
+
+export const cleanTaxQueries = ({ commit }) => {
+ commit('cleanTaxQueries');
+};
diff --git a/src/js/store/modules/search/mutations.js b/src/js/store/modules/search/mutations.js
index 08a1fb8c4..ce0f7cb77 100644
--- a/src/js/store/modules/search/mutations.js
+++ b/src/js/store/modules/search/mutations.js
@@ -154,4 +154,12 @@ export const removeFilterTag = ( state, filterTag ) => {
export const cleanFilterTags = ( state ) => {
state.filter_tags = [];
+};
+
+export const cleanMetaQueries = (state) => {
+ state.postquery.metaquery = [];
+};
+
+export const cleanTaxQueries = (state) => {
+ state.postquery.taxquery = [];
};
\ No newline at end of file