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 _remove_script_version( $src ){ | |
$parts = explode( '?ver', $src ); | |
return $parts[0]; | |
} | |
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); |
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
# Enable Compression | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
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 | |
$sdtime = DateTime::createFromFormat("d F, Y", '1 February, 2018'); | |
$edtime = DateTime::createFromFormat("d F, Y", '30 February, 2018'); | |
$startday = $sdtime->getTimestamp(); | |
$endday = $edtime->getTimestamp(); | |
$q = new WP_Query( | |
array( |
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
This way does it with links intact. That is www.oldsite.com/some/crazy/link.html will become www.newsite.com/some/crazy/link.html. This is extremely helpful when you are just “moving” a site to a new domain. Place this on the OLD site: | |
Redirect 301 / http://newsite.com/ |
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
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html | |
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/ |
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 | |
function limit_words($string, $word_limit) { | |
$words = explode(' ', $string); | |
return implode(' ', array_slice($words, 0, $word_limit)); | |
} | |
Uages |
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-easing-js | |
$('.smooth-menu a').bind('click', function(event){ | |
var $anchor = $(this); | |
var headerH = '30'; | |
$('html, body').stop().animate({ | |
scrollTop : $($anchor.attr('href')).offset().top - headerH +"px" }, 1200, 'easeInOutExpo'); | |
event.preventDefault(); | |
}); |
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
html code | |
<div class="footer-area"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<div class="footer-Up"> | |
<a href="#" class="scrollToTop"> | |
<span class="glyphicon glyphicon-menu-up"></span> | |
</a> |
NewerOlder