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
$('img').each(function() { | |
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ | |
var ieversion=new Number(RegExp.$1) | |
if (ieversion>=9) | |
if (typeof this.naturalWidth === "undefined" || this.naturalWidth === 0) { | |
this.src = "http://placehold.it/" + ($(this).attr('width') || this.width || $(this).naturalWidth()) + "x" + (this.naturalHeight || $(this).attr('height') || $(this).height()); | |
} | |
} else { | |
if (!this.complete || typeof this.naturalWidth === "undefined" || this.naturalWidth === 0) { | |
this.src = "http://placehold.it/" + ($(this).attr('width') || this.width) + "x" + ($(this).attr('height') || $(this).height()); |
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
First thing you have to create different single post template like | |
single_portfolio.php | |
single_news.php | |
single_wordpress.php | |
single_default.php //For default single post template for post other than above categories. | |
After that open your single.php file remove all code and add following code | |
<?php | |
$post = $wp_query->post; | |
if (in_category('portfolio')) { |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = 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
$(window).load(function() { | |
$(".loader_inner").fadeOut(); | |
$(".loader").delay(400).fadeOut("slow"); | |
}); |
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 heightDetect() { | |
$(".main_head").css("height", $(window).height()); | |
}; | |
heightDetect(); | |
$(window).resize(function() { | |
heightDetect(); |
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
<a href="#" class="scrollToTop"><i class="fa fa-chevron-up fa-2x"></i></a> |