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
// in footer.php or header.php | |
<div><strong>Current template:</strong> <?php get_current_template( true ); ?></div> | |
// in functions.php | |
/** | |
* Define current template file | |
* | |
* Create a global variable with the name of the current | |
* theme template file being used. | |
* |
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
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ | |
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20, | |
width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},s |
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
jQuery(document).ready(function($) { | |
var $filterBox = $('.filter').isotope({ | |
itemSeletor: '.filter', | |
layoutMode: 'fitRows' | |
}); | |
$('.filter-btn').on('click', function() { | |
var filterValue = $(this).data('filter'); | |
$filterBox.isotope({ | |
filter: filterValue |
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
/// Mixin to customize scrollbars | |
/// Beware, this does not work in all browsers | |
/// @author Hugo Giraudel | |
/// @param {Length} $size - Horizontal scrollbar's height and vertical scrollbar's width | |
/// @param {Color} $foreground-color - Scrollbar's color | |
/// @param {Color} $background-color [mix($foreground-color, white, 50%)] - Scrollbar's color | |
/// @example scss - Scrollbar styling | |
/// @include scrollbars(.5em, slategray); | |
@mixin scrollbars($size, $foreground-color, $background-color: mix($foreground-color, white, 50%)) { | |
// For Google Chrome |
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
//Открыть окно поделиться в новом, маленьком окне | |
$('.share__link').click(function (e) { | |
e.preventDefault(); | |
var wpWidth = $(window).width(), wpHeight = $(window).height(); | |
window.open($(this).attr('href'),'Share',"top="+(wpHeight-400)/2 + ",left="+(wpWidth-600)/2+",width=600,height=400"); | |
}) |
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 add_products_cat() { | |
$orderby = 'name'; | |
$order = 'asc'; | |
$hide_empty = false ; | |
$cat_args = array( | |
'orderby' => $orderby, | |
'order' => $order, | |
'hide_empty' => $hide_empty, | |
); |
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 echo $trimed_content = apply_filters('the_content', wp_trim_words(get_the_content(), 62)); ?> |
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="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<?php if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<?php the_content(); ?> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
</div> | |
</div> |
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
@mixin lhCrop($line-height) { | |
&::before { | |
content: ''; | |
display: block; | |
height: 0; | |
width: 0; | |
margin-top: calc((1 - #{$line-height}) * 0.5em); | |
} | |
} |
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
<h2>Headings</h2> | |
<h1>Header one</h1> | |
<h2>Header two</h2> | |
<h3>Header three</h3> | |
<h4>Header four</h4> | |
<h5>Header five</h5> | |
<h6>Header six</h6> | |
<h2>Blockquotes</h2> | |
<p>Single line blockquote:</p> | |
<blockquote><p>Stay hungry. Stay foolish.</p></blockquote> |