This file contains hidden or 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 | |
/* | |
Template Name: Bio Really Full Width | |
*/ | |
?> | |
<?php get_header(); ?> | |
<div class="bio"> | |
<div id="let-nikki-fly"><div id="flying-nikki"></div></div> |
This file contains hidden or 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 | |
// calcBagVolume() - Calculate the volume of a bag or satcel. Provide the width/height dimensions in cms and get the volume in litres | |
function calcBagVolume($length,$width) { | |
// https://mathworld.wolfram.com/PaperBagSurface.html | |
$volume = pow($width,3) * ( ( $length / (pi() * $width) ) - ( 0.142 * ( 1 - (pow(10,(0-($length/$width)) ) ) ) ) ); | |
$litres = $volume / 1000; | |
return $litres; |
This file contains hidden or 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 the_post_navigation(array( | |
'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title">%title</span>', | |
'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title</span>', 'in_same_term' => true, | |
) ); ?> | |
This file contains hidden or 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 | |
// Thanks to: | |
// | |
// https://stackoverflow.com/questions/36506088/upload-multiple-featured-images-in-a-custom-post-wordpress | |
//init the meta box | |
add_action( 'after_setup_theme', 'custom_postimage_setup' ); | |
function custom_postimage_setup(){ | |
add_action( 'add_meta_boxes', 'custom_postimage_meta_box' ); |
This file contains hidden or 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 this code to allow support for categories in Custom Post Widget content blocks. | |
*/ | |
add_action( 'init', 'add_content_block_taxonomies', 99 ); | |
function add_content_block_taxonomies() { |
This file contains hidden or 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
// | |
// 5 columns in a 12 column grid | |
// | |
.grid-x > .small-2-4 { | |
@include grid-column(2.4); // (12/5 = 2.4) | |
} | |
.grid-x > .medium-2-4 { | |
@include breakpoint(medium) { | |
@include grid-column(2.4); // (12/5 = 2.4) | |
} |
This file contains hidden or 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 init | |
git add . | |
git commit -m "Initial Commit" | |
// You can find the URL next to the git clone command for the repository. | |
// E.g., {URL} = https://[email protected]/username/repo.git | |
// | |
// Refer to: https://community.atlassian.com/t5/Git-questions/fatal-No-such-remote-origin-after-git-remote-set-url-origin/qaq-p/401456 | |
// |
This file contains hidden or 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 Category support to the Custom Post Widget - https://wordpress.org/plugins/custom-post-widget/ | |
// NB - Must set the priority to a high number | |
// | |
add_action( 'init', 'add_content_block_taxonomies', 99 ); | |
function add_content_block_taxonomies() { | |
register_taxonomy_for_object_type( 'category', 'content_block' ); | |
} |
This file contains hidden or 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
1 - Get coastline .SHP file - https://export.hotosm.org/ | |
2 - Convert .SHP file to GeoJSON format - https://mapshaper.org/ | |
3 - Create final GeoJSON file - https://geojson.io/ |
This file contains hidden or 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
// General GF Date Picker - based on https://jboullion.com/gravity-forms-date-picker-styling | |
#ui-datepicker-div { | |
background: $white !important; | |
border: 1px solid $medium-gray !important; | |
border-radius: 0 !important; | |
display: none; | |
padding: rem-calc(20) !important; | |
width: rem-calc(280) !important; | |
text-shadow: none !important; |