Skip to content

Instantly share code, notes, and snippets.

@topleague
topleague / add-excerpt-support-pages-genesis.php
Created July 9, 2017 13:18
Add Excerpt support to Pages in Genesis
//* Add Excerpt support to Pages in Genesis
add_post_type_support( 'page', 'excerpt' );
@topleague
topleague / genesis-footer-author-byline.php
Created July 15, 2017 05:56
Display Author Byline under Footer
@topleague
topleague / author-box-below-post.php
Created July 15, 2017 05:59
Display Author Box Below Single Post
//* Display Author Box Below Single Post
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
add_action( 'genesis_entry_content', 'genesis_do_author_box_single' );
@topleague
topleague / genesis-page-subtitlte-conditonally.php
Created July 15, 2017 06:02
Display Excerpt as Page Subtitle in Genesis (Conditionally)
//* Display Excerpt as Page Subtitle in Genesis
add_action( 'genesis_entry_header', 'leaguewp_page_subtitle', 10 );
function leaguewp_page_subtitle() {
if ( is_singular( 'page' ) && has_excerpt() ) {
printf( '<p class="excerpts">%s</p>', get_the_excerpt() );
}
}
@topleague
topleague / genesis-post-subtitlte-conditonally.php
Created July 15, 2017 06:03
Display Excerpt as Page Subtitle in Genesis (Conditionally)
//* Display Excerpt as Post Subtitle in Genesis
add_action( 'genesis_entry_content', 'leaguewp_post_subtitle', 9 );
function leaguewp_post_subtitle() {
if ( is_singular( 'post' ) && has_excerpt() ) {
printf( '<p class="excerpts">%s</p>', get_the_excerpt() );
}
}
@topleague
topleague / entry-title-author-byline-category.css
Created July 15, 2017 06:11
Show Entry Title, Author Byline, Category Info on Left Side
/* Add the following to your CSS file or custom CSS file */
.entry-content {
width: 70%;
position: relative;
display: inline-block;
float: right;
}
header.entry-header {
@topleague
topleague / move-entry-header-genesis-sample.php
Created July 28, 2017 17:37
Move Entry Header in Genesis Sample
// Move Entry Header to a Full-width Hook
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
add_action( 'genesis_after_header', 'genesis_entry_header_markup_open', 5 );
add_action( 'genesis_after_header', 'genesis_do_post_title' );
add_action( 'genesis_after_header', 'genesis_post_info' );
add_action( 'genesis_after_header', 'genesis_entry_header_markup_close', 15 );
@topleague
topleague / inline-responsive-menu-genesis.css
Last active August 17, 2017 06:08
Inline Responsive Menu in Genesis
/* Add the following at the end in Genesis Sample’s style.css
Source: https://sridharkatakam.com/add-inline-mobile-responsive-menu-genesis-sample/
*/
.nav-primary {
border-top: none;
float: right;
}
@media only screen and (max-width: 1023px) {
@topleague
topleague / inline-mobile-responsive-menu-genesis.php
Last active March 20, 2018 18:59
Inline Mobile Responsive Menu in Genesis
// Add the following to your functions.php
// Source: https://sridharkatakam.com/add-inline-mobile-responsive-menu-genesis-sample/
// Note: Before adding the code, remove or comment out the following line (on Line Number 117)
// add_theme_support( 'genesis-menus', array( 'primary' => __( 'After Header Menu', 'genesis-sample' ), 'secondary' => __( 'Footer Menu', 'genesis-sample' ) ) );
// Rename primary and secondary navigation menus.
add_theme_support( 'genesis-menus', array(
'primary' => __( 'Primary Navigation Menu', 'genesis-sample' ),
'secondary' => __( 'Footer Menu', 'genesis-sample' ) )
);
@topleague
topleague / inline-mobile-responsive-menu-parallax-pro.php
Last active August 4, 2017 06:30
Inline Mobile Responsive Menu in Parallax Pro Theme
// Add the following to your functions.php
// Source: http://genesiswp.net/relocate-responsive-menu-parallax-pro/
// Note: Before adding the code, remove or comment out the following line (on Line Number 93)
// add_theme_support( 'genesis-menus', array( 'primary' => __( 'Before Content Menu', 'parallax-pro' ), 'secondary' => __( 'Footer Menu', 'parallax-pro' ) ) );
// Rename primary and secondary navigation menus.
add_theme_support( 'genesis-menus', array(
'primary' => __( 'Primary Navigation Menu', 'parallax-pro' ),
'secondary' => __( 'Footer Menu', 'parallax-pro' ) )
);