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_filter('image_size_names_choose', 'my_image_sizes'); | |
function my_image_sizes($sizes) { | |
$addsizes = array( | |
"new-size" => __( "New Size") | |
); | |
$newsizes = array_merge($sizes, $addsizes); | |
return $newsizes; | |
} |
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
//Use correct selector | |
$('.your-selector').text(function(){ | |
return $(this).text().substr($(this).text().indexOf('insert-your-break-point-here')); | |
}); |
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
// onScreen jQuery plugin v0.2.1 | |
// (c) 2011-2013 Ben Pickles | |
// | |
// http://benpickles.github.io/onScreen | |
// | |
// Released under MIT license. | |
;(function($) { | |
$.expr[":"].onScreen = function(elem) { | |
var $window = $(window) | |
var viewport_top = $window.scrollTop() |
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
// Change the '9' at the end to the id of your form | |
add_action('gform_post_submission_9','pullcsv',10,2); | |
function pullcsv($entry, $form){ | |
//Fields to change | |
$file_field = 3; | |
$text_field = 4; | |
$entry_id = $entry['id']; | |
$csv = $entry[$file_field]; //this returns a url string to the uploaded csv | |
$row = 1; | |
if (!empty($csv)){ |
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 _href = $("a.variables").attr("href"); | |
$("a.variables").attr("href", _href + '?id='+ $_GET["id"]); |
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="leftCol">Left</div> | |
<div id="rightCol">Right</div> | |
<div id="centerCol">Center</div> |
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
<a href="#" class="rollover" title="Webvamp"><span class="displace">Webvamp</span></a> |
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
//remove everything (and including) before ":" | |
<script type="text/javascript">jQuery(document).ready(function($){ | |
$('.ai1ec-event-time').each(function(){ | |
var str = $(this).html(); | |
str = str.split(":").pop(); | |
$(this).html(str); | |
}); | |
}); | |
</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
<style> | |
div{height:100px} | |
.left{float:left; width:100px;} | |
.right{float:right; width:300px;} | |
.middle-wrap{overflow:hidden} | |
.middle{margin:0 auto; width:50px} | |
</style> | |
<div class="left"></div> | |
<div class="right"></div> | |
<div class="middle-wrap"> |
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
/* Also, add the plugin Simple Page Ordering to enable the ability to drag and drop posts to a specified order | |
add_action( 'genesis_before_loop', 'ntg_do_query' ); | |
/** Changes the Query before the Loop */ | |
function ntg_do_query() { | |
$posttype = get_post_type(); | |
if( $posttype == 'portfolio'){ | |
global $query_string; | |
query_posts( wp_parse_args( $query_string, array( 'orderby' => 'menu_order', 'order' => 'ASC' ) ) ); |