Skip to content

Instantly share code, notes, and snippets.

@studiopress
studiopress / next-page.php
Last active January 14, 2017 02:47
Genesis post navigation.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize the next page link
add_filter ( 'genesis_next_link_text' , 'sp_next_page_link' );
function sp_next_page_link ( $text ) {
return 'Custom Next Page Link &#x000BB;';
}
@studiopress
studiopress / search-form-input-box.php
Last active March 29, 2018 22:09
Genesis search form.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize search form input box text
add_filter( 'genesis_search_text', 'sp_search_text' );
function sp_search_text( $text ) {
return esc_attr( 'Search my blog...' );
}
@studiopress
studiopress / page_blog.php
Last active August 7, 2021 00:59
Genesis page content on blog template.
<?php
//* Template Name: Blog
//* Show page content above posts
add_action( 'genesis_loop', 'genesis_standard_loop', 5 );
genesis();
@studiopress
studiopress / unregister-primary-sidebar.php
Last active December 17, 2015 07:09
Genesis sidebars.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Unregister primary sidebar
unregister_sidebar( 'sidebar' );
@studiopress
studiopress / structural-wraps.php
Last active July 6, 2016 15:02
Genesis structural wraps.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'menu-primary',
'menu-secondary',
'site-inner',
'footer-widgets',
@studiopress
studiopress / disable-superfish.php
Last active December 17, 2015 07:09
Genesis scripts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Disable the superfish script
add_action( 'wp_enqueue_scripts', 'sp_disable_superfish' );
function sp_disable_superfish() {
wp_deregister_script( 'superfish' );
wp_deregister_script( 'superfish-args' );
}
@studiopress
studiopress / style.css
Last active December 17, 2015 07:09
Genesis style sheet header.
/*
Theme Name: Sample
Theme URI: http://www.yourdomain.com/
Description: This is a sample child theme created for the Genesis Framework.
Author: Your Business Name
Author URI: http://www.yourbusiness.com/
Version: 1.0
Tags: custom-background, custom-header, featured-images, threaded-comments, two-columns
@studiopress
studiopress / register-widget-area-1.php
Last active August 11, 2016 15:10
Genesis after post widget.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Register after post widget area
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'After Post', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );
@studiopress
studiopress / color-styles.css
Last active January 14, 2017 02:41
Genesis color styles.
.theme-blue a,
.theme-blue a:visited {
color: #0d72c7;
}
@studiopress
studiopress / genesis-box-widget.php
Last active December 29, 2016 15:49
Genesis box after posts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Register Genesis box widget area
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'Genesis Box', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );