Skip to content

Instantly share code, notes, and snippets.

@authentikHQ
authentikHQ / functions.php
Created October 18, 2018 13:48
Remove entry meta in entry footer with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove entry meta in entry footer.
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
@authentikHQ
authentikHQ / functions.php
Last active October 18, 2018 13:48
Customize entry meta in entry footer with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Customize entry meta in entry footer.
add_filter( 'genesis_post_meta', 'athk_entry_meta_footer' );
function athk_entry_meta_footer($post_meta) {
$post_meta = '[post_categories] [post_tags]';
return $post_meta;
@authentikHQ
authentikHQ / functions.php
Last active October 18, 2018 13:48
Add support for structural wraps with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add support for structural wraps.
add_theme_support( 'genesis-structural-wraps', array(
'header',
'nav',
'subnav',
'site-inner',
@authentikHQ
authentikHQ / functions.php
Last active October 18, 2018 13:49
Enqueue Ionicons with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Enqueue Ionicons.
add_action( 'wp_enqueue_scripts', 'athk_enqueue_ionicons' );
function athk_enqueue_ionicons() {
wp_enqueue_style( 'ionicons', '//unpkg.com/ionicons@4.4.0/dist/css/ionicons.min.css', array(), CHILD_THEME_VERSION );
}
@authentikHQ
authentikHQ / functions.php
Last active October 18, 2018 13:49
Add image sizes with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add image sizes.
add_image_size( 'front-page-hero', 1600, 900, TRUE );
add_image_size( 'front-page-square', 400, 400, TRUE );
add_image_size( 'front-page-thumbnail', 320, 180, TRUE );
@authentikHQ
authentikHQ / functions.php
Last active October 18, 2018 13:53
Remove secondary sidebar with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove secondary sidebar.
unregister_sidebar( 'sidebar-alt' );
@authentikHQ
authentikHQ / functions.php
Last active October 18, 2018 13:53
Remove primary sidebar with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove primary sidebar.
unregister_sidebar( 'sidebar' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 02:07
Add previous and next post links after the entry with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add previous and next post links after entry.
add_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 02:09
Customize next page link in entry navigation with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Customize next page link in entry navigation.
add_filter ( 'genesis_next_link_text' , 'athk_next_page_link' );
function athk_next_page_link ( $text ) {
return 'Next Page &raquo;';
}
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 02:10
Customize previous page link in entry navigation with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Customize previous page link in entry navigation.
add_filter ( 'genesis_prev_link_text' , 'athk_previous_page_link' );
function athk_previous_page_link ( $text ) {
return '&laquo; Previous Page';
}