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 | |
/** | |
* Get one value from an serialized array example | |
* | |
* @link http://stackoverflow.com/questions/8192789/getting-one-value-out-of-a-serialized-array-in-php#8192803 | |
* | |
* @author Nick Davis | |
* | |
* @return 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
.home-row4 .post:nth-child(odd) { | |
margin-left: initial; | |
} | |
.home-row4 .post:nth-of-type(odd) { | |
clear: left; | |
} | |
.home-row4 .post:nth-of-type(even) { | |
margin-left: 18%; |
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_action( 'acf/init', 'nd_acf_add_local_field_groups' ); | |
/** | |
* Add Advanced Custom Fields programatically (Flexible Content field). | |
* | |
* @link https://www.advancedcustomfields.com/resources/register-fields-via-php/ | |
* @link https://support.advancedcustomfields.com/forums/topic/register-two-locations-via-php-doesnt-work/ | |
* @link https://support.advancedcustomfields.com/forums/topic/adding-additional-layout-to-flexible_content-field-in-child-theme/ | |
* |
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_action( 'acf/init', 'nd_acf_add_local_field_groups' ); | |
/** | |
* Add Advanced Custom Fields programatically (Repeater field). | |
* | |
* @link https://www.advancedcustomfields.com/resources/register-fields-via-php/ | |
* @link https://support.advancedcustomfields.com/forums/topic/register-two-locations-via-php-doesnt-work/ | |
* @link https://support.advancedcustomfields.com/forums/topic/adding-additional-layout-to-flexible_content-field-in-child-theme/ | |
* |
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
.before-content { | |
height: auto; | |
margin-bottom: -124px; | |
margin-top: 0; | |
top: -124px; | |
} | |
.backstretch, | |
.backstretch img { | |
height: auto !important; |
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
@media only screen and (max-width: 900px) { | |
.header-image .site-title a { | |
min-height: 95px; /* You need to allow more space for the logo if you're doing this so increase the min-height to suit */ | |
} | |
.header-image .site-header .wrap { | |
/* background-size: 93px 48px;*/ /* Removes image resizing completely, otherwise you can uncomment it and adjust the size manually by changing the values (making sure to keep it in proportion to the original image */ | |
} | |
} |
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_action( 'wp_enqueue_scripts', 'kickstart_enqueue_backstretch_scripts' ); | |
// Enqueue Backstretch script and prepare images for loading | |
function kickstart_enqueue_backstretch_scripts() { | |
// Don't do any backstretching on the homepage (CUSTOM) | |
if ( is_front_page() ) { | |
return; | |
} |
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_theme_support( 'genesis-footer-widgets', 3 ); |
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 | |
function nd_featured_image_size_sniff() { | |
if ( ! has_post_thumbnail() ) { | |
return; | |
} | |
$featured_image_id = get_post_thumbnail_id( get_the_ID() ); | |
$featured_image_metadata = wp_get_attachment_metadata( $featured_image_id ); |