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 Media (attachments) to JetSearch post types selector | |
| add_filter( 'jet-search/tools/get-post-types', function( $post_types ) { | |
| $post_types['attachment'] = 'Media'; | |
| return $post_types; | |
| } ); | |
| // Include attachments in JetSearch queries | |
| function jet_search_intercept_media_query( $query ) { |
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 | |
| // ========================================== | |
| // CONFIGURATION (Set your slugs here once) | |
| // ========================================== | |
| define( 'MY_CUSTOM_CPT_SLUG', 'properties' ); // Put your CPT slug here | |
| define( 'MY_REPEATER_FIELD_SLUG', 'repeater' ); // Put your repeater meta field slug here | |
| // ========================================== | |
| // 1. Register a new column in the admin panel table |
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_action( 'jet-engine/register-macros', function() { | |
| class URL_Contains extends \Jet_Engine_Base_Macros { | |
| public function macros_tag() { | |
| return 'url_contains'; | |
| } |
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 ( empty( $query['meta_query'] ) ) { | |
| return $query; | |
| } | |
| foreach ( $query['meta_query'] as $index => $meta_query_item ) { | |
| // Check for our custom marker key (e.g., user_prop__multi_search) | |
| if ( isset( $meta_query_item['key'] ) && false !== strpos( $meta_query_item['key'], 'user_prop__multi_search' ) ) { | |
| $search_value = $meta_query_item['value']; |
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 () { | |
| if (!window?.JetPlugins?.hooks) { | |
| return; | |
| } | |
| const { addAction } = JetPlugins.hooks; | |
| addAction( | |
| "jet.fb.input.makeReactive", | |
| "jet-form-builder/jet-appointments-booking/custom-get-count", |
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-engine/gallery/slider/atts', function( $args ) { | |
| $args['autoplay'] = true; | |
| $args['autoplay_speed'] = 1000; | |
| return $args; | |
| } ); |
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('click', (e) => { | |
| const popup = document.getElementById('jet-popup-2580'); | |
| //replce jet-popup-2580 with jet-popup-(your popup id) | |
| if (!popup) return; | |
| if (!e.target.closest('#jet-popup-2580 .jet-popup__close-button, #jet-popup-2580 .jet-popup__overlay')) return; | |
| //replce jet-popup-2580 with jet-popup-(your popup id) | |
| const iframe = popup.querySelector('iframe[src*="youtube.com/embed"]'); | |
| //replce iframe[src*="youtube.com/embed"] to your selector if you don't have youtube video |
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 | |
| class JEC_Repeater_Format_Number { | |
| public function __construct() { | |
| add_filter( | |
| 'jet-engine/listings/filters-list', | |
| array( $this, 'add_callback' ) | |
| ); | |
| } | |
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-engine/gallery/grid/args', function( $args ) { | |
| $args['lightbox'] = true; | |
| // default args: | |
| // 'size' => 'full', | |
| // 'lightbox' => false, | |
| // 'cols_desk' => 3, | |
| // 'cols_tablet' => 3, |
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(); |
NewerOlder