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 | |
/** | |
* Enforce anti-spam honeypot on all Gravity forms. | |
* | |
* @param array $form | |
* | |
* @return array $form | |
*/ | |
add_filter( 'gform_form_post_get_meta', function ( $form ) { | |
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
$(document).ready(function() { | |
$(':not(.sibling-element) + .sibling-element, * > .sibling-element:first-of-type'). | |
each(function() { | |
$(this). | |
nextUntil(':not(.sibling-element)'). | |
addBack(). | |
wrapAll('<div class="sibling-wrapper" />'); | |
}); | |
}); |
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 | |
/** | |
* Retrieves all post meta data according to the structure in the $config | |
* array. | |
* | |
* Provides a convenient and more performant alternative to ACF's | |
* `get_field()`. | |
* | |
* This function is especially useful when working with ACF repeater fields and | |
* flexible content layouts. |
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 | |
/** | |
* Template Name: Two Categories in Two Rows | |
* | |
*/ | |
//* Remove the standard loop | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
//* Add classes to display the posts in a grid |
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
// Require our dependencies | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var browserSync = require('browser-sync').create(); | |
gulp.task('styles', function(){ | |
return gulp.src('sass/style.scss') | |
.pipe(sass({ | |
outputStyle: 'expanded', // Options: nested, expanded, compact, compressed | |
indentType: 'tab', |
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
//* Register widget areas | |
genesis_register_sidebar( array( | |
'id' => 'parallax-section-below-header', | |
'name' => __( 'Parallax Section Below Header', 'your-theme-slug' ), | |
'description' => __( 'This is the parallax section below header.', 'your-theme-slug' ), | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'parallax-section-above-footer', | |
'name' => __( 'Parallax Section Above Footer', 'your-theme-slug' ), |
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_filter( 'template_include', 'your_custom_cpt_template', 99 ); | |
/** | |
* Load an alternative template file for a given post type | |
* | |
* @param string $template path to the default template | |
* @return string $template path to the default template | |
* @return string $custom_template path to the custom template | |
*/ | |
function your_custom_cpt_template( $template ) { |
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( 'before_genesis_site-inner_wrap', 'do_full_width_page_header' ); | |
/** | |
* Adds a div with a background image before the site-inner wrap. | |
*/ | |
function do_full_width_page_header() { | |
printf( '<div class="full-width-page-header" style="background: url(\'%s\');"></div>', | |
wp_get_attachment_image_url( 2623, 'full' ) | |
); |
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_filter( 'get_the_content_more_link', 'prefix_change_more_link_text' ); | |
/** | |
* Replaces the default Genesis [Read More...] with Read More. | |
* | |
* @param string $more_link The content more link. | |
* | |
* @return string | |
*/ | |
function prefix_change_more_link_text( $more_link ) { |
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 'title_placeholder' to the array of arguments when registering the custom post type. | |
$cpt_args = array( | |
'title_placeholder' => 'Team member name', | |
); | |
register_post_type( 'team_members', $cpt_args ); |
NewerOlder