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
/************************************************ | |
* * | |
* Open external links in a new window. * | |
* - requires links to have a 'rel' attribute * | |
* of "external" * | |
* - requires jQuery * | |
* * | |
************************************************/ | |
function externalLinks(){ | |
$('a[rel="external"]').click(function(e){ |
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
/*********************************************** | |
* * | |
* Declare global variables for all of the * | |
* elements that you are going to be using for * | |
* size reference. * | |
* * | |
***********************************************/ | |
var landscape = false, | |
portrait = false, | |
ww,wh,dw,dh; |
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 that will prevent default bounce * | |
* behaviour in iOS applications. * | |
* (Also prevents any touch-scrolling) * | |
* - requires jQuery * | |
* * | |
***********************************************/ | |
function preventBounce(){ | |
$(document).bind('touchmove',function(e) { |
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
/**************************************************************** | |
* * | |
* Conditional statement to retrieve content based on the * | |
* existence of a Custom Field. * | |
* If the Custom Field exists, display the content of the * | |
* Custom Field (can be adjusted to display alternate content). * | |
* * | |
****************************************************************/ | |
// Check for existence of content in that custom field |
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 | |
// Gather all of the parameters / filters to be used in your database query as an array of arguments | |
$args = array( | |
'post_type' => 'page', | |
'page_id' => '2064', | |
'posts_per_page' => '1', | |
'cat' => '7', | |
'offset' => '7', | |
'paged' => '7', | |
'orderby' => 'rand', |
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 | |
$thisIp = $_SERVER['REMOTE_ADDR']; | |
if($thisIp == 'the.ip.you.test'){ | |
// Do something | |
} | |
else{ | |
// Show the normal state | |
} | |
?> |
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
var winDim = {}; | |
winDim.X = window.innerWidth; | |
winDim.Y = window.innerHeight; | |
var screenDim = {}; | |
screenDim.X = screen.width; | |
screenDim.Y = screen.height; |
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
var checker = 0; | |
$(window).resize(function(){ | |
if(window.matchMedia){ | |
var mq = window.matchMedia( "(min-width: 940px)" ); | |
var aMatch = mq.matches; | |
if(checker == 0){ | |
if(aMatch) { | |
return; |
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
<meta property="og:title" content="This is the title of your page" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:url" content="http://yoursite.com/" /> | |
<meta property="og:image" content="http://www.theymc.com/wp-content/themes/theymc/assets/images/ymc_logo_374.png" /> | |
<meta property="fb:admins" content="000000009" /> |
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
<!doctype html> | |
<html> | |
<head> | |
<!-- Inside the <head> tag will be content about your web page, or links to other resources. --> | |
</head> | |
<body> | |
<!-- Inside the <body> tag will be the content that appears in your browser window --> | |
</body> |
OlderNewer