This file contains 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( 'after_setup_theme', function () { | |
// Add image sizes | |
$shop_thumbnail = wc_get_image_size( 'shop_thumbnail' ); | |
$shop_catalog = wc_get_image_size( 'shop_catalog' ); | |
$shop_single = wc_get_image_size( 'shop_single' ); | |
// In the lines below, true = hard crop; false = proportional |
This file contains 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="frame"> | |
<div class="post-content"> | |
<?php if (!is_single() && of_get_option('of_excerptset')=='1') { | |
$image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> | |
<img src="<?php echo $image; ?>"> | |
<?php the_excerpt(); ?> | |
<?php } else { ?> | |
<?php //Removed the original line below ?> | |
<?php //the_content( __('Read more', 'cr') );?> | |
<?php //Added this one insted: ?> |
This file contains 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($) { | |
$.fn.animated = function(inEffect, outEffect) { | |
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) { | |
if (dir === "down") { | |
$(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1"); | |
} else { | |
$(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1"); | |
}; | |
}, { | |
offset: "90%" |
This file contains 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
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
/* IE10+ specific styles go here */ | |
.map-container svg { | |
position: static !important; | |
height: 500px !important; | |
width: 130% !important; | |
} | |
} | |
/* ie 8.9.10 */ |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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() { | |
$("#findme").on("click",function(e) { | |
e.preventDefault(); | |
if ( !navigator.geolocation ) { | |
$("#whereami").val("Your browser is also lost, probably because it doesn't support geo-location."); | |
} else { | |
$("#findme").animate({ | |
opacity: "0.25" | |
},"fast"); | |
navigator.geolocation.getCurrentPosition(positionDisplay,showGeoError); |
This file contains 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
/* Get user WebCam*/ | |
<script> | |
navigator.getUserMedia = ( navigator.getUserMedia || | |
navigator.webkitGetUserMedia || | |
navigator.mozGetUserMedia || | |
navigator.msGetUserMedia); | |
if (navigator.getUserMedia) { | |
navigator.getUserMedia ( |
This file contains 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
/*Scroll to ID*/ | |
// handle links with @href started with '#' only | |
$(document).on('click', '.pages-smaller ul li a[href^="#"]', function(e) { | |
// target element id | |
var id = $(this).attr('href'); | |
// target element | |
var $id = $(id); | |
if ($id.length === 0) { |
This file contains 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
.visually-hidden { | |
position: absolute !important; | |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ | |
clip: rect(1px, 1px, 1px, 1px); | |
padding:0 !important; | |
border:0 !important; | |
height: 1px !important; | |
width: 1px !important; | |
overflow: hidden; | |
} |
This file contains 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 ( have_posts() ) : // если имеются записи в блоге. | |
query_posts('cat=3'); // указываем ID рубрик, которые необходимо вывести. | |
while (have_posts()) : the_post(); // запускаем цикл обхода материалов блога | |
?> | |
<?php the_post_thumbnail(array(100, 100)); ?> | |
<? endwhile; // завершаем цикл. | |
endif; | |
/* Сбрасываем настройки цикла. Если ниже по коду будет идти еще один цикл, чтобы не было сбоя. */ | |
wp_reset_query(); |
NewerOlder