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
$(window).on('load', function() { | |
var $container = $('.members_results'); | |
$container.imagesLoaded( function() { | |
$container.isotope({ | |
itemSelector : '.block-member', | |
layoutMode : 'masonry', | |
percentPosition: true | |
}); | |
}); |
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 | |
function getBrowser() | |
{ | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | |
$browser = "N/A"; | |
$browsers = [ | |
'/msie/i' => 'Internet explorer', | |
'/firefox/i' => 'Firefox', | |
'/safari/i' => 'Safari', |
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 if (is_singular('post_type_here')) { ?> | |
<div class="sc-nav"> | |
<div class="sc_prev-next"><?php previous_post_link('%link', 'Previous') ?></div> | |
<div class="sc_prev-next"><?php next_post_link('%link', 'Next') ?></div> | |
</div><?php } ?> |
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
<div class="loader" style="display:block" ></div> | |
<style type='text/css'> | |
.loader{ | |
display: none; | |
} | |
.loader { | |
position: fixed; | |
left: 0px; | |
top: 0px; |
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/query_results', function($query) { | |
$total = $query->found_posts; | |
if ($total == 0) { | |
echo '<p class="text-align-center">No items found.</p>'; | |
} | |
}); |
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
/wp-content/plugins/js_composer/include/autoload/hook-vc-grid.php | |
And edit line 86, from: | |
. '([\\w-_]+)' // 2: Shortcode name | |
to | |
. '([\\w\-_]+)' // 2: Shortcode name |
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 gt_get_post_view() { | |
$count = get_post_meta( get_the_ID(), 'post_views_count', true ); | |
return "$count views"; | |
} | |
function gt_set_post_view() { | |
$key = 'post_views_count'; | |
$post_id = get_the_ID(); | |
$count = (int) get_post_meta( $post_id, $key, true ); | |
$count++; | |
update_post_meta( $post_id, $key, $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
add_action( 'wp_footer', function() { | |
if ( ! defined( 'ELEMENTOR_VERSION' ) ) { | |
return; | |
} | |
?> | |
<script> | |
window.addEventListener('elementor/frontend/init', function() { | |
elementorFrontend.hooks.addFilter( 'frontend/handlers/menu_anchor/scroll_top_distance', function( scrollTop ) { | |
return scrollTop - 180; |
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 | |
// Get all the categories | |
$categories = get_terms( 'sccategory' ); | |
// Loop through all the returned terms | |
foreach ( $categories as $category ): | |
// set up a new query for each category, pulling in related posts. | |
$services = new WP_Query( | |
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
CKEDITOR.editorConfig = function (config) { | |
config.allowedContent = true; | |
}; |