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
$('[data-placeholder]').focus(function() { | |
if ($(this).val() == $(this).attr('data-placeholder')) { | |
$(this).removeClass('inactive'); | |
$(this).val(''); | |
} | |
}); | |
$('[data-placeholder]').blur(function() { | |
if ($(this).val() == '') { | |
$(this).addClass('inactive'); |
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 placeholder attributes to Gravity Form inputs. | |
*/ | |
function my_standard_settings($position, $form_id) { | |
if ($position == 25) : ?> | |
<li class="admin_label_setting field_setting" style="display:list-item;"> | |
<label for="field_placeholder">Placeholder Text | |
<a href="javascript:void(0);" class="tooltip tooltip_form_field_placeholder" tooltip="<h6>Placeholder</h6>Enter the placeholder/default text for this field.">(?)</a> | |
</label> |
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 get_posts_page_title() { | |
if (get_option('show_on_front') == 'page') { | |
return get_the_title(get_option('page_for_posts')); | |
} | |
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
function classIfOffset(element, class, offset) { | |
var scroll = $(window).scrollTop(); | |
if (scroll > offset) { | |
element.addClass(class); | |
} else { | |
element.removeClass(class); | |
} | |
} |
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
input[type="email"], | |
input[type="number"], | |
input[type="password"], | |
input[type="search"], | |
input[type="tel"], | |
input[type="text"], | |
input[type="url"], | |
textarea { | |
/* styles */ | |
} |
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
<header class="page-row"> | |
<h1>Site Title</h1> | |
</header> | |
<main class="page-row page-row-expanded"> | |
<p>Page content goes here.</p> | |
</main> | |
<footer class="page-row"> | |
<p>Copyright, blah blah blah.</p> |
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
<header class="page-row"> | |
<!-- apply your styles to me --> | |
<div class="header-inner"> | |
<h1>Site Title</h1> | |
</div> | |
</header> |
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 | |
// first, get the image ID returned by ACF | |
$image_id = get_field('my_image_field'); | |
// and the image size you want to return | |
$image_size = 'thumbnail'; | |
// use wp_get_attachment_image_src to return an array containing the image | |
// we'll pass in the $image_id in the first parameter |
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 | |
// first, get the image object returned by ACF | |
$image_object = get_field('my_image_field'); | |
// and the image size you want to return | |
$image_size = 'thumbnail'; | |
// now, we'll exctract the image URL from $image_object | |
$image_url = $image_object['sizes'][$image_size]; |
OlderNewer