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
RewriteEngine On | |
RewriteBase / | |
#RewriteCond %{HTTP_HOST} !^www.harmony-group.com [NC] | |
#RewriteRule ^(.*)$ http://www.harmony-group.com/$1 [L,R=301] | |
RewriteRule ^about.html /about-us/ [L,R=301] | |
RewriteRule ^residential.html /luxury-apartments/ [L,R=301] | |
RewriteRule ^commercial.html /luxury-office-space/ [L,R=301] | |
RewriteRule ^storage.html /self-storage-facilities/ [L,R=301] |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.2.min.js"><\/script>')</script> |
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 | |
/* | |
This allows us to be able to use conditional | |
to check whether is_post_type = "your custom post type here" | |
And can be used inside OR outside the loop | |
*/ | |
function is_post_type($type){ | |
global $wp_query; | |
if($type == get_post_type($wp_query->post->ID)) return true; | |
return false; |
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
/* | |
* JS Redirection Mobile | |
* | |
* Developed by | |
* Sebastiano Armeli-Battana (@sebarmeli) - http://www.sebastianoarmelibattana.com | |
* Dual licensed under the MIT or GPL Version 3 licenses. | |
* @version 0.9.5 | |
*/ | |
if(!window.SA){window.SA={};}SA.redirection_mobile=function(m){var c=function(y){var x=new Date();x.setTime(x.getTime()+y);return x;};var q=function(C){if(!C){return;}var x=document.location.search,D=x&&x.substring(1).split("&"),z=0,B=D.length;for(;z<B;z++){var y=D[z],A=y&&y.substring(0,y.indexOf("="));if(A===C){return y.substring(y.indexOf("=")+1,y.length);}}};var a=navigator.userAgent.toLowerCase(),s="false",f="true",w=m||{},r=w.noredirection_param||"noredirection",t=w.mobile_prefix||"m",o=w.mobile_url,d=w.mobile_scheme?w.mobile_scheme+":":document.location.protocol,p=document.location.host,i=q(r),j=o||(t+"."+(!!p.match(/^www\./i)?p.substring(4):p)),k=w.cookie_hours||1,g=w.keep_path||false,v=w.keep_query||false,h=w.tablet_url||j,b=!!(a.match(/(iPhone|iPod|blackberry|android 0.5|htc|lg|midp|mmp|mobile|nokia|o |
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
<!-- Custom Post Type Loop --> | |
<?php $query = new WP_Query(array( | |
'post_type' => 'testimonials', | |
'posts_per_page' => -1, | |
'orderby' => 'rand' | |
)); | |
while ( $query->have_posts() ) : $query->the_post(); | |
echo '<div class="custompost">'; | |
the_content(); |
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
/* COLORS FOR CAR Types */ | |
$mini-van-base: #344556; //blue | |
$sedan-base: #b43d3d; //red | |
$suv-base: #7a4c8e; //purple | |
$truck-base: #d0922f; //yellow | |
$convertible-base: #ff5831; //orange | |
@each $car_type, $color in | |
( mini-van, $mini-van-base ), | |
( sedan, $sedan-base ), |
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
# Apache .htaccess | |
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 | |
# Nginx | |
location ~ ^/wp-content/uploads/(.*) { | |
rewrite ^/wp-content/uploads/(.*)$ http://livewebsite.com/wp-content/uploads/$1 redirect; | |
} |
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
// check if element is in viewport | |
// if so, then add/remove class | |
// http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport/7557433#7557433 | |
(function($) { | |
// function to check if element is in viewport | |
function inViewport(element) { | |
if (typeof jQuery === "function" && element instanceof jQuery) { | |
element = element[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
<?php | |
/** | |
* Maintainn Gravity Forms Hooks & Filter overrides | |
* | |
*/ | |
/* | |
* Filter the Gravity Forms button type and add your own .class | |
*/ | |
function your_prefix_form_submit_button( $button, $form ) { |
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
// Usage: | |
// get_id_by_slug( 'any-page-slug' ); | |
function get_id_by_slug( $page_slug ) { | |
$page = get_page_by_path( $page_slug ); | |
if ( $page ) { | |
return $page->ID; | |
} else { | |
return null; |