Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@authentikHQ
authentikHQ / functions.php
Created November 23, 2018 01:09
Remove Gutenberg style sheet from loading with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove Gutenberg style sheet from loading.
add_action( 'wp_enqueue_scripts', 'athk_remove_gutenberg_style_sheet', 200 );
function athk_remove_gutenberg_style_sheet() {
wp_dequeue_style( 'wp-block-library' );
wp_deregister_style( 'wp-block-library' );
@authentikHQ
authentikHQ / functions.php
Last active November 23, 2018 01:09
Customize site footer with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove site footer.
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
// Customize site footer
add_action( 'genesis_footer', 'athk_custom_site_footer' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:54
Remove author box on single posts with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove author box on single posts.
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:54
Remove author box on archive pages with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove author box on archive pages.
remove_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:53
Customize author box Gravatar size with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Modify Gravatar size in author box.
add_filter( 'genesis_author_box_gravatar_size', 'athk_author_box_gravatar' );
function athk_author_box_gravatar( $size ) {
return '96';
}
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:52
Customize author box title with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Customize author box title.
add_filter( 'genesis_author_box_title', 'athk_custom_author_box__title' );
function athk_custom_author_box__title() {
return '<h1>About the Author</h1>';
}
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:52
Add author box on single posts with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add author box on single posts.
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:51
Add author box on archive pages with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add author box on single posts.
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:49
Set a default site layout with the Genesis Framework.
<?php
// Do NOT include the opening php tag
// Set content/sidebar as the default layout.
genesis_set_default_layout( 'content-sidebar' );
// Set sidebar/content as the default layout.
genesis_set_default_layout( 'sidebar-content' );
// Set content/sidebar/sidebar as the default layout.
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:48
Remove inpost site layouts with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove inpost site layouts.
remove_theme_support( 'genesis-inpost-layouts' );