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
| add_action( 'elementor/query/get_siblings', function( $query ) { | |
| $current_pageID = get_queried_object_id(); | |
| // Modify the query | |
| $query->set( 'post_parent', wp_get_post_parent_id($current_pageID) ); | |
| } ); |
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
| add_action( 'elementor/query/get_children', function( $query ) { | |
| $current_pageID = get_queried_object_id(); | |
| // Modify the query | |
| $query->set( 'post_parent', $current_pageID ); | |
| } ); |
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
| add_action( 'elementor/query/posts_by_category', function( $query ) { | |
| global $post; | |
| $obj = get_category_by_slug($post->post_name); | |
| $cat_id = $obj->term_id; | |
| if($cat_id){ | |
| $taxonomy = 'category'; | |
| $tax_query = array( | |
| array( |
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 pim_cptui_add_post_types_to_archives( $query ) { | |
| if ( is_admin() || ! $query->is_main_query() ) { | |
| return; | |
| } | |
| if ( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
| $cptui_post_types = cptui_get_post_type_slugs(); | |
| $query->set( |
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
| <script> | |
| jQuery(document).ready(function() { | |
| var $win = jQuery(window); | |
| var elementTop, elementBottom, viewportTop, viewportBottom; | |
| function isScrolledIntoView(elem) { | |
| elementTop = jQuery(elem).offset().top; | |
| elementBottom = elementTop + jQuery(elem).outerHeight(); |
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 pim_get_event_acf($content){ | |
| global $post; | |
| $custom_fields = ''; | |
| if(is_singular('post')){ | |
| $location = str_replace(' ', '+', get_field('location')); | |
| $start_date = str_replace('/', '-', get_field('event_date', $post->ID )); | |
| $end_date = str_replace('/', '-', get_field('event_end_date', $post->ID )); | |
| if($start_date) $start_date = date("F j, Y - h:i A", strtotime($start_date) ); | |
| if($start_date && $end_date) $end_date = date("F j, Y - h:i A", strtotime($end_date)); | |
| $website = get_field('website', $post->ID); |
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
| .wpb-page-list{ | |
| display: block; | |
| margin: 10px 0 35px; | |
| } | |
| .wpb-page-list__item{ | |
| display: grid; | |
| grid-template-columns: 60px 1fr; | |
| grid-column-gap: 16px; | |
| align-items: center; | |
| text-decoration: none; |
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
| jQuery("#login_form").submit(function(){ | |
| jQuery(".response_div").html('<div class="notice notice-info is-dismissible"><p class="spinner is-active">Checking user credentials..</p></div>'); | |
| var username = jQuery("input[name=user]").val(); | |
| var password =jQuery( "input[name=pass]").val(); | |
| jQuery.get(ajaxurl,{'action': 'test_user', 'username': username, 'password': password}, |
NewerOlder