This file contains hidden or 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
| <?php | |
| use Jet_Engine\Query_Builder\Manager; | |
| add_filter('jet-smart-filters/post-type/meta-fields-settings', 'custom_register_controls'); | |
| function custom_register_controls($fields) { | |
| $queries = Manager::instance()->get_queries_for_options(); |
This file contains hidden or 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
| document.addEventListener("DOMContentLoaded", function() { | |
| var searchInput = document.querySelector(".jet-ajax-search__field"); | |
| if (searchInput) { | |
| searchInput.focus(); | |
| var inputEvent = new Event('input', { bubbles: true }); | |
| searchInput.dispatchEvent(inputEvent); | |
| } | |
| }); |
This file contains hidden or 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
| document.addEventListener('jet-smart-filters/inited', function(initEvent) { | |
| jQuery(function($) { | |
| window.JetSmartFilters.events.subscribe('ajaxFilters/updated', function(provider, queryId) { | |
| const elementToScrollToId = 'all_ads_listing'; // Specify the ID of the element you want to scroll to | |
| const elementToScrollTo = document.getElementById(elementToScrollToId); | |
| if (elementToScrollTo) { | |
| elementToScrollTo.scrollIntoView({ | |
| behavior: 'smooth', | |
| block: 'start', |
This file contains hidden or 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
| function handleBlockedDates(config, daysToBlock) { | |
| const validateDay = config.beforeShowDay; | |
| config.beforeShowDay = function (t) { | |
| const day = moment(t); | |
| const value = jQuery("[data-field-name='_capacity']:checked").val(); | |
| if (value == 7) { | |
| const result = validateDay(t); | |
| return result; |
This file contains hidden or 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
| let activeTaxonomies = {}; | |
| document.addEventListener('jet-smart-filters/inited', function (initEvent) { | |
| const filterGroups = JetSmartFilters.filterGroups; | |
| JetSmartFilters.events.subscribe('fiter/change', function (clickedFilter) { | |
| const filterInfo = clickedFilter.additionalFilterSettings; | |
| const queryVar = filterInfo && filterInfo.filter.queryVar; | |
| console.log('Filter Info:', filterInfo); | |
| console.log('Query Var:', queryVar); |
This file contains hidden or 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
| <?php | |
| add_filter('jet-smart-filters/filter-instance/args', function ($args) { | |
| $filter_id = $args['filter_id']; | |
| $query_var = get_post_meta($filter_id, '_query_var', true); | |
| $step = get_post_meta($filter_id, '_source_step', true); | |
| $source_cb = get_post_meta($filter_id, '_source_callback', true); | |
| $source_query = get_post_meta($filter_id, '_source_query', true); | |
| if (!$step) { |
This file contains hidden or 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
| document.addEventListener("DOMContentLoaded", function () { | |
| // Get references to the video iframe and pop-up container | |
| const videoIframe = document.querySelector("#jet-popup-1950 iframe.jet-video-iframe"); | |
| const popUpContainer = document.querySelector("#jet-popup-1950 .jet-popup__container-content"); | |
| // Function to pause the video | |
| function pauseVideo() { | |
| videoIframe.contentWindow.postMessage('{"method":"pause"}', '*'); | |
| } |
This file contains hidden or 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
| /* CSS for Sticky Header on Mobile */ | |
| @media screen and (max-width: 768px) { | |
| header { | |
| position: fixed; | |
| top: 0; | |
| width: 100%; | |
| z-index: 999; | |
| transition: top 0.3s ease; | |
| } | |
| } |
This file contains hidden or 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
| <?php | |
| add_filter('jet-smart-filters/query/final-query', function($query) { | |
| if (($query['orderby'] ?? '') === 'meta_value_num' && ($query['meta_key'] ?? '') === 'psm') { | |
| $query['meta_query'][] = array( | |
| 'key' => 'psm', | |
| 'value' => 0, | |
| 'compare' => '>', | |
| 'type' => 'NUMERIC', | |
| ); |
NewerOlder