Skip to content

Instantly share code, notes, and snippets.

View j-mccarthy's full-sized avatar
💭
passing by

John McCarthy j-mccarthy

💭
passing by
  • flowethic
  • United Kingdom
View GitHub Profile
<?php // <- Remove <?php if your using this snippet
genesis_set_default_layout( 'top-sidebar-content-sidebar' );
<?php // <- Remove <?php if your using this snippet
genesis_unregister_layout( 'sidebar-sidebar-content' );
<?php // <- Remove <?php if your using this snippet
// Hook in just before the main content-sidebar-wrap
add_action( 'genesis_before_content_sidebar_wrap', 'custom_layout_sidebar' );
function custom_layout_sidebar() {
$layout = genesis_site_layout();
// check to see if the custom layout exists
if( 'layout-name' == $layout ) {
<?php // <- Remove <?php if your using this snippet
// Register New Layout
function jm_custom_layout() {
genesis_register_layout( 'layout-name', array(
'label' => __('custom/layout/name', 'genesis'),
'img' => get_bloginfo('stylesheet_directory') . '/images/yourlayout.gif'
) );
}
add_action( 'init', 'jm_custom_layout' );
<?php // <- Remove <?php if your using this snippet
// Register New Layout
function jm_custom_layout() {
genesis_register_layout( 'layout-name', array(
'label' => __('custom/layout/name', 'genesis'),
'img' => get_bloginfo('stylesheet_directory') . '/images/yourlayout.gif'
) );
}
add_action( 'init', 'jm_custom_layout' );
<?php
/**
* Sidebar Name
*
* @package John's Theme
* @since 0.0.2
* @link
* @author John McCarthy @ johnmccarthy.co
* @copyright Copyright (c) 2014, John McCarthy
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
<?php < Remove if just pulling this snippet into your functions.php file
//* Add Widgets to Site Tagline
add_action( 'genesis_after_header', 'new_widget' );
function new_widget() {
echo '<div class="new-widget_container">',
genesis_structural_wrap( 'new-widget' );
<?php // <- Remove <?php if your using this snippet
/**
* CENTER CONTENT / BOTTOM SIDEBAR
*/
// Register New Layout
function jm_center_post_layout() {
genesis_register_layout( 'center-bottom', array(
'label' => __('Center/Bottom', 'genesis'),
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
Body {
font-weight: 400; // New font weight for better legibility
}
@media only screen and (max-width: 800px) {
body {
font-size: 16px; // Bring's more contrast to the font
font-weight: 300; // Back to defualt setting
}