Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
jamiemitchell / masonry-scroll.php
Last active August 27, 2015 08:13 — forked from frankschrijvers/masonry-scroll.php
Masonry with Infine scroll page template
<?php
/*
Template Name: Masonry Grid Scroll
*/
/*
* @author Frank Schrijvers
* @link https://www.wpstud.io
*/
@jamiemitchell
jamiemitchell / style.css
Last active August 29, 2015 13:56
Basic idea for adding a box around page heading in Genesis Metro theme
.custom-title .entry-title {
background: none repeat scroll 0 0 #F96E5B;
color: #FFFFFF;
font-size: 48px;
font-size: 4.8rem;
font-weight: 700;
padding: 80px 60px;
padding: 8rem 6rem;
text-align: center;
function mp_remove_body_classes($classes, $class){
foreach($classes as &$str){
if(strpos($str, "YOUR_CLASS_HERE") > -1){
$str = "";
}
}
return $classes;
}
add_filter("body_class", "mp_remove_body_classes", 10, 2);
@jamiemitchell
jamiemitchell / style.css
Created February 23, 2014 07:07
JM Sample Theme. A 1200px Responsive Theme for Genesis
/*
Theme Name: Genesis Sample
Description: This is the sample theme created for the Genesis Framework.
Author: Jamie mitchell
Author URI: http://demo.jamiemitchelldesign.com.au//
Version: 0.0.1
Tags: black, orange, white, one-column, two-columns, three-columns, fixed-width, custom-menu, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready
Template: genesis
<?php
//* don't copy php tag above
//* add following code to functions.php:
//* Load backstretch js
/** Add metabox for backstretch default/fallback background image */
add_action( 'genesis_theme_settings_metaboxes', 'themename_theme_settings_metaboxes', 10, 1 );
function themename_theme_settings_metaboxes( $pagehook ) {
@jamiemitchell
jamiemitchell / functions.php
Created March 2, 2014 06:44
Move primary nav, you may need to change the number '15' to suit your needs.
<?php
//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_after_header', 'genesis_do_nav', 15 );
// Default Simple Social Icon Styles
add_filter( 'simple_social_default_styles', 'minmimum_default_style' );
function minmimum_default_style( $defaults ) {
$defaults['size'] = '100';
$defaults['border_radius'] = '100';
$defaults['icon_color'] = '#fff';
$defaults['icon_color_hover'] = '#fff';
$defaults['background_color'] = '#404435';
$defaults['background_color_hover'] = '#3c4556';
<?php
add_action('genesis_after_header','portfolio_title');
function portfolio_title() { ?>
<div class="portfolio-title">
<div class="wrap">
<h1 class="entry-title" itemprop="headline">
<span class="portfolio-headline">Portfolio » </span>
<?php the_title(); ?>
</h1>
<?php
/* Template Name: Portfolio */
/**
* Portfolio Listing
*
*/
function be_portfolio_listing() {
$args = array(
'post_type' => 'portfolio',
@jamiemitchell
jamiemitchell / front-page.php
Created September 21, 2014 07:36
Add a second custom loop for CPT to a front page template in Genesis that won't effect the defailt loop.
<?php
//* Add markup for homepage portfolio
add_action( 'genesis_after_header', 'minimum_home_portfolio', 20 );
function minimum_home_portfolio() {
printf( '<div %s>', genesis_attr( 'home-portfolio' ) );
genesis_structural_wrap( 'home-portfolio' );