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 | |
//* OPTIONAL STEP - Keep the form disappearing. | |
//* Gravity Forms notification popup instead of the page redirect or AJAX notification. | |
//* Props to @WilliamAlexander in the comments | |
//* @link https://anythinggraphic.net/gravity-forms-notification-popup | |
add_filter( 'gform_confirmation', 'ag_custom_confirmation', 10, 4 ); | |
function ag_custom_confirmation( $confirmation, $form, $entry, $ajax ) { | |
add_filter( 'wp_footer', 'ag_overlay'); |
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 | |
/* Force full width conditionally | |
----------------------------------------------------------------------------------------*/ | |
add_action( 'genesis_meta', 'bw_force_layout' ); | |
function bw_force_layout() { | |
if ( is_front_page() ) { | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
} | |
} |
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( 'genesis_entry_header', 'ag_header_wrap_open', 5 ); | |
function ag_header_wrap_open() { | |
echo '<div class="wrap align-center">'; | |
} | |
add_action( 'genesis_entry_header', 'ag_header_wrap_close', 14 ); | |
function ag_header_wrap_close() { | |
echo '</div>'; |
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
/* | |
Original link http://www.templatemonster.com/blog/style-checkboxes-radio-buttons-css adapted to Gravity Forms. | |
Uses Font Awesome. Make sure to wrap labels in <span> like so: | |
<script type="text/javascript"> | |
jQuery(function($) { | |
$(".gfield_checkbox label, .gfield_radio label").wrapInner("<span></span>") | |
}); | |
</script> | |
*/ |
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
/* | |
Original link http://www.templatemonster.com/blog/style-radioes-radio-buttons-css adapted to Gravity Forms. | |
Uses Font Awesome. Make sure to wrap labels in <span> like so: | |
<script type="text/javascript"> | |
jQuery(function($) { | |
$(".gfield_checkbox label, .gfield_radio label").wrapInner("<span></span>") | |
}); | |
</script> | |
*/ |
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 | |
/* @link https://anythinggraphic.net/change-header-logo-link-in-genesis-updated-for-html5-schema/ | |
/* Updated from Bill Erickson's original post http://www.billerickson.net/code/genesis-change-logo-url to include support for new HTML5 themes and schema rich snippets. | |
/* Change header logo link in Genesis | |
----------------------------------------------------------------------------------------*/ | |
add_filter('genesis_seo_title', 'ag_change_logo_url', 10, 3 ); | |
function ag_change_logo_url( $title, $inside, $wrap ) { | |
$inside = sprintf( '<a href="%s" title="%s">%s</a>', esc_url( 'http://nmbree.org' ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) ); | |
$title = sprintf( '<%s class="site-title" itemscope="headline">%s</%s>', $wrap, $inside, $wrap ); |
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 | |
/* @link https://anythinggraphic.net/change-class-id-itemtype-and-other-attributes-in-genesis/ | |
/* Change microdata for Article with the class 'entry' in Genesis child themes | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'genesis_attr_entry', 'ag_article_attributes', 20 ); | |
function ag_article_attributes( $attributes ) { | |
if( is_singular( 'leadership' ) ) { | |
// class, id, itemscope, itemtype, etc. | |
$attributes['itemtype'] = 'http://schema.org/Organization'; |
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 | |
/* @link https://anythinggraphic.net/allow-shortcodes-in-author-box-for-genesis/ | |
/* Allow shortcodes in the Author Box for users | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'genesis_author_box', 'do_shortcode', 20 ); |
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 | |
/* @link https://anythinggraphic.net/change-navigation-menu-item-url-itemtype-schema-microdata/ | |
/* Change microdata for specific menu items | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'nav_menu_link_attributes', 'ag_menu_item_attributes', 10, 3 ); | |
function ag_menu_item_attributes( $atts, $item, $args ) { | |
// The ID of the target menu item | |
// Remove this to target all menu items | |
$menu_target = 123; |
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 | |
/* @link https://anythinggraphic.net/disable-emojis-in-wordpress-without-a-plugin | |
/* Remove emoji scripts and dns prefetch | |
----------------------------------------------------------------------------------------*/ | |
add_action( 'init', 'ag_disable_wp_emojicons' ); | |
function ag_disable_wp_emojicons() { | |
// all actions related to emojis | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); |