Skip to content

Instantly share code, notes, and snippets.

@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:47
Remove a site layout with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove content/sidebar layout.
genesis_unregister_layout( 'content-sidebar' );
// Remove sidebar/content layout.
genesis_unregister_layout( 'sidebar-content' );
// Remove content/sidebar/sidebar layout.
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:46
Force a site layout with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Force content-sidebar layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
// Force sidebar-content layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content' );
// Force content-sidebar-sidebar layout.
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:43
Reposition secondary navigation menu with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Reposition secondary navigation menu.
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_header', 'genesis_do_subnav' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:43
Reposition primary navigation menu with the Genesis Framework
<?php
// Do NOT include the opening php tag.
// Reposition primary navigation menu.
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:42
Remove secondary navigation menu with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove secondary navigation menu.
add_theme_support(
'genesis-menus', array(
'primary' => __( 'Primary Menu', 'theme-name' ),
)
);
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:41
Remove primary navigation menu with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove primary navigation menu.
add_theme_support(
'genesis-menus', array(
'secondary' => __( 'Secondary Menu', 'theme-name' ),
)
);
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:39
Remove primary/secondary navigation menus with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove primary/secondary navigation menus.
remove_theme_support( 'genesis-menus' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:37
Remove post format images with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove post format images.
remove_action( 'genesis_entry_header', 'genesis_do_post_format_image', 4 );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:36
Add post format images with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add post format images.
add_theme_support( 'genesis-post-format-images' );
@authentikHQ
authentikHQ / functions.php
Created October 29, 2018 13:36
Add post formats with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Add support for post formats.
add_theme_support( 'post-formats', array(
'aside',
'audio',
'chat',
'gallery',
'image',