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
############################################################################### | |
## ## | |
## GIT IGNORE FOR WORDPRESS SITES ## | |
## ------------------------------ ## | |
## By: BigWilliam <hello@bigwilliam.com> ## | |
## Last Modified: 2016-06-16 ## | |
## ## | |
## License: MIT - aka you can use/modify this how you want :) ## | |
## ## | |
############################################################################### |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = 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
// Add login/logout links to the footer navigation | |
// Put this in functins.php | |
// This will filter through the menu items and look for the footer-menu. | |
// Then append login/logout links to the end | |
function add_loginout_menu_to_footer( $items, $args ) { | |
if ( is_admin() || $args->theme_location != 'footer-menu' ) // only add login/out items to the footer menu | |
return $items; | |
$link = wp_loginout( $redirect = home_url(), $echo = false ); // use wp_loginout() to return the correct login OR logout link strings |
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 formElements = '.formClass input, .formClass textarea, #anyID'; | |
$(document).ready(function(){ | |
$(formElements).each(function(){ //do this for each element | |
$.data(this, 'default', this.value); //grab the default value and pair with 'default' | |
}).focus(function(){ | |
if ( $.data(this, 'default') === $(this).val() ) { // on focus: clear the value if it's the default | |
$(this).val(''); | |
} | |
}).blur(function(){ |
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 | |
/****** featured image for blog page ******/ | |
$page_for_posts = get_option('page_for_posts'); // gets the ID of the page that displays posts | |
$default_attr = array( // these are the attributes that can be passed to the image. See WP codex for all options. | |
'class' => "featured-header-image", | |
); | |
global $wp_query; |
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 id="email-form"> | |
<p id="form-above"><strong>Enter your email to receive an exclusive first look invitation!</strong></p> | |
<p id="form-above-error"><strong>Please enter a valid email address. </strong></p> | |
<p id="form-above-success"><strong>Thank you! We will be sending you an invitation soon.</strong></p> | |
<form method="" action="" id="subscribe-form"> | |
<fieldset class="cfix"> | |
<input type="text" class="text" name="email" id="subscribe-email" value="Enter your email" /> | |
<input type="submit" class="submit" name="submit" value="Submit" /> | |
</fieldset> | |
</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
/********************************************* | |
rollover effects for iOS devices for multiple | |
elements on a page. | |
see this in action here: www.sharenpay.com | |
*********************************************/ | |
$(document).ready(function() { | |
$('.spider-popup').hide(); // hide all the popups at first | |
$('.spider-circle').mouseover(function() { |
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> | |
<meta charset="UTF-8"> | |
<title>Auto-set div height to window</title> | |
<meta author="BigWilliam"> | |
<meta description="How to set a div to the size of any browser window with jQuery" | |
</head> | |
<body style="margin: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
Start with this: | |
<link rel="shortcut icon" href="/ico/favicon.ico"> | |
And add this to the end of the image href: ?v=2 like this... | |
<link rel="shortcut icon" href="/ico/favicon.ico?v=2"> | |
This will tell your browser that the old version is out of date and to use the new version |