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
var isMobile = (/iPhone|iPad|iPod/i.test(navigator.userAgent)); | |
if (!isMobile) { | |
(function() { | |
var css = [ | |
'./path/to/file.css' | |
], | |
i = 0, | |
link = document.createElement('link'), | |
head = document.getElementsByTagName('head')[0], | |
tmp; |
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 highlight_results($text){ | |
if(is_search()){ | |
$keys = implode('|', explode(' ', get_search_query())); | |
$text = preg_replace('/(' . $keys .')/iu', '<span class="search-highlight">\0</span>', $text); | |
} | |
return $text; | |
} | |
add_filter('the_content', 'highlight_results'); | |
add_filter('the_excerpt', 'highlight_results'); | |
add_filter('the_title', 'highlight_results'); |
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
var homeBannerTitleSwiper = new Swiper('.home-banner_title-slider', { | |
pagination: '.home-banner_slider-pagination', | |
paginationClickable: true, | |
prevButton: '.home-banner_slider-prev', | |
nextButton: '.home-banner_slider-next', | |
speed: 750, | |
slidesPerView: 1, | |
spaceBetween: 15, | |
loop: true, | |
onlyExternal: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
(function ($) { | |
$('.wpcf7-file').each(function() { | |
$(this).change(function() { | |
var file = $(this)[0].files[0]; | |
console.log(file); | |
if (file) { | |
console.log("Not empty"); | |
$(this).parents("p").siblings(".delete-file").show(); | |
$(this).parents("p").siblings(".file-name").show().html(file.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
sudo chown -Rf www-data.www-data /var/www/html/ | |
sudo chmod 777 -R /var/www/html |
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
<section class="news-list" data-aos-offset="0" data-aos-delay="2500" | |
data-aos="fade" data-aos-duration="1500"> | |
<div class="news-list-mixer"> | |
<?php | |
$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1; | |
$query_args = array( | |
'post_type' => 'news', | |
'order' => 'DESC', | |
'paged' => $paged, |
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
$cats = wp_get_post_terms( get_the_ID(), 'category' ); | |
$cats_ids = array(); | |
foreach( $cats as $wpex_related_cat ) { | |
$cats_ids[] = $wpex_related_cat->term_id; | |
} | |
$args = array( | |
'post_type' => 'post', | |
'order' => 'ASC', | |
'posts_per_page' => '3', | |
'category__in' => $cats_ids, |
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
//Insert in wp-config.php file | |
define('FS_METHOD','direct');define('FS_CHMOD_DIR',0755);define('FS_CHMOD_FILE',0644); | |
define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/uploads'); |
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).ready(function () { | |
$('.submit-btn').prop('disabled', true); | |
$('.form-field').keyup(function () { | |
$('.form-field').each(function () { | |
$('.submit-btn').prop('disabled', this.value == "" ? true : false); |