Skip to content

Instantly share code, notes, and snippets.

@topleague
topleague / inline-responsive-menu-parallax-pro.css
Last active August 4, 2017 06:31
Inline Responsive Menu in Parallax Pro Theme
/* Add the following at the end in Parallax Pro’s style.css
or Add them here (Appearance > Customize > Addtional CSS).
Source: http://genesiswp.net/relocate-responsive-menu-parallax-pro/
*/
.nav-primary {
float: right;
margin-bottom: 0;
}
@topleague
topleague / page_sitemap.php
Created August 17, 2017 06:57
Create a Sitemap in Genesis
<?php
/**
* Genesis Framework.
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* @package Genesis\Templates
* @author StudioPress
* @license GPL-2.0+
@topleague
topleague / custom-template-team.php
Created August 27, 2017 16:20
Custom Template for Team
<?php
//* Template Name: Team
//* Force full width content layout
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
//* Add body class to the head of team template
add_filter( 'body_class', 'team_add_body_class' );
function team_add_body_class( $classes ) {
@topleague
topleague / barebone-frontpage-genesis-sample.php
Last active August 28, 2017 12:50
Barebone Front Page in Genesis Sample
<?php
// Header.
get_header();
// Footer.
get_footer();
@topleague
topleague / register-first-widget-genesis-sample.php
Created August 28, 2017 12:21
Register the First Widget in Genesis
// Register front-page-1 widget areas
genesis_register_widget_area(
array(
'id' => "front-page-1",
'name' => __( "Front Page 1", 'my-theme-text-domain' ),
'description' => __( "This is the front page 1 section.", 'my-theme-text-domain' ),
)
);
@topleague
topleague / register-second-widget-genesis-sample.php
Created August 28, 2017 12:22
Register the second widget in Genesis Sample
// Register front-page-2 widget area
genesis_register_widget_area(
array(
'id' => "front-page-2",
'name' => __( "Front Page 2", 'my-theme-text-domain' ),
'description' => __( "This is the front page 2 section.", 'my-theme-text-domain' ),
)
);
@topleague
topleague / add-content-first-widget-genesis-sample.php
Created August 28, 2017 12:23
Add Content to First Widget in Genesis Sample
// Content.
genesis_widget_area( "front-page-1", array(
'before' => '<div class="front-page-1 front-page-section"><div class="wrap">',
'after' => '</div></div>',
) );
@topleague
topleague / add-content-second-widget-genesis-sample.php
Created August 28, 2017 12:24
Add content to second widget in Genesis Sample
genesis_widget_area( "front-page-2", array(
'before' => '<div class="front-page-2 front-page-section"><div class="wrap">',
'after' => '</div></div>',
) );
@topleague
topleague / enqueue-styles-front-page-genesis.php
Created August 28, 2017 12:26
Add Styles to Front Page in Genesis Sample
// Enqueue styles
wp_enqueue_style( 'front-styles', get_stylesheet_directory_uri() . '/style-front.css', array(), CHILD_THEME_VERSION );
@topleague
topleague / class-attributes-front-page-genesis-sample.php
Created August 28, 2017 12:29
Add Class Attributes to Front Page in Genesis Sample
// Add attributes for site-inner element, since we're removing 'content'.
function be_site_inner_attr( $attributes ) {
// Add a class of 'full' for styling this .site-inner differently
$attributes['class'] .= ' full';
// Add the attributes from .entry, since this replaces the main entry
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
return $attributes;
}
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );