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 | |
/* | |
Official Gravity Forms documentation on get_entries() found here: | |
https://docs.gravityforms.com/api-functions/#get-entries | |
*/ | |
/* Gravity Form ID. */ | |
$form_id = '20'; | |
/* Sorting options avalable but left blank for simplicity. */ |
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 | |
// Add styles to the login page | |
function login_css() { ?> | |
<style type="text/css"> | |
/* Change the WP logo to your own */ | |
#login h1 a, .login h1 a { | |
background-image: url('<?php echo get_stylesheet_directory_uri(); ?>/path/to/logo.png'); | |
height: 150px; | |
width: 150px; |
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
// settings | |
$remBase: 16; //set base font size. unitless value in pixels. | |
$widthMin: 480; //set small breakpoint. unitless value in pixels. | |
$widthMax: 1024; //set large breakpoint. unitless value in pixels. | |
@mixin font-size($valueMin, $valueMax) { | |
// turn mixin parameters into rem value. | |
$fontMin: $valueMin * $remBase; | |
$fontMax: $valueMax * $remBase; | |
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 | |
// Register support for Gutenberg wide images in your theme | |
function mytheme_setup() { | |
add_theme_support( 'align-wide' ); | |
} | |
add_action( 'after_setup_theme', 'mytheme_setup' ); |
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
.forms li input, .forms li textarea { | |
font-size: 16px; // was 15px | |
padding: .66em 1em; // was 15px | |
} | |
form#form-vlc-race-registration label.field_label { | |
margin: 1em 0 0 0; // was 16px 0 3px 0 | |
} | |
form#form-vlc-race-registration h2 { |
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 | |
$size = 'large'; | |
$image_ID = get_field('field_name'); // when using ACF, choose 'Image ID' for return value | |
$image_array = wp_get_attachment_image_src($image_ID, $size); | |
$image_URL = $image_array[0]; | |
echo $image_URL; | |
?> |
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 | |
$imageID = get_sub_field('img_id'); // ACF should return image ID | |
$size = 'full'; | |
?> | |
<img | |
class="jetpack-lazy-image" | |
src="<?php echo wp_get_attachment_image_url( $imageID, '$size' ) ?>" | |
srcset="<?php echo wp_get_attachment_image_srcset( $imageID, '$size' ) ?>" | |
sizes=" (min-width: 1400px) 800px, |
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
// Meat Monthly // | |
<div id="bbox-root" class="form"></div> | |
<script type="text/javascript"> | |
window.bboxInit = function () { | |
bbox.showForm('458c52ea-a95b-478e-8b49-7346b1779a45'); | |
}; | |
(function () { | |
var e = document.createElement('script'); e.async = true; | |
e.src = 'https://bbox.blackbaudhosting.com/webforms/bbox-min.js'; |
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 | |
// Add a custom image size using the following function. | |
add_image_size( 'image-size-name', $imageWidthInPixels); | |
// Examples: | |
// Resized to 300px wide by proportionbal height. | |
add_image_size('headshot', 300); |
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
// must come after wp_footer(); | |
var elem = document.querySelector("#masthead"); | |
var headroom = new Headroom(elem, { | |
"offset": 100, | |
"tolerance": 8, | |
"classes": { | |
"initial": "headroom", | |
"pinned": "headroom--is-pinned", | |
"unpinned": "headroom--is-hidden" | |
} |