Last active
April 19, 2017 22:34
-
-
Save mikeisonthenets/49767dae6d554bfa65382f0745b05a32 to your computer and use it in GitHub Desktop.
v2 Embed Filtering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){ | |
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t); | |
e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e); | |
})(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st'); | |
_st('install','YOUR_INSTALL_KEY','2.0.0', { | |
install: { | |
hooks: { | |
query_filter: function(query) { | |
query.setFilterDataByDocumentTypeSlugAndFilterField('page', 'FIELD_NAME', { values: ['VALUE1', 'VALUE2'], type: "and" }); | |
return query; | |
} | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
type
will default toor