Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Adds po.st social sharing buttons
* to single posts and pages.
* Create an account at http://po.st
* to get a publisher key.
*
* @author Robert Neu
* @link http://youneedfat.com
* @copyright Copyright (c) 2013, FAT Media, LLC
<?php
/**
* The custom testimonials post type archive template
*
* @since 1.0.0
*
* @author FAT Media <why@youneedfat.com>
* @package Genesis
*
* @copyright Copyright (c) 2012, FAT Media
<?php
/**
* Template Name: Testimonial Archives
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive
*/
/** Remove Post Info */
remove_action('genesis_before_post_content','genesis_post_info');
<?php
/** Create a custom sidebar for WooCommerce store pages */
add_action( 'genesis_before', 'prefix_remove_store_sidebar' );
function prefix_remove_store_sidebar() {
if ( is_active_sidebar( 'store-sidebar' ) && ( is_shop() || is_product() || is_cart() || is_checkout() ) ) {
// Remove the standard genesis sidebar
remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
@nhatdong
nhatdong / style.css
Created November 29, 2013 15:56 — forked from robneu/style.css
/*
Mobile Menu for Genesis 1.x
Version: 1.0.0
License: GPL-2.0+
License URI: http://www.opensource.org/licenses/gpl-license.php
*/
/* Primary Navigation
--------------------------------------------- */
<?php
//* Require Child Theme Functions
require_once( CHILD_DIR . '/lib/theme-js.php' );
add_action( 'genesis_header_right', 'prefix_mobile_menu_toggle', 5 );
/**
* Add a mobile menu toggle element
* to expand and collapse a mobile menu.
*
* @author FAT Media
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
add_action( 'wp_enqueue_scripts', 'prefix_enqueue_mobile_js' );
/**
* Add a script which depends on jQuery
* to enable a responsive menu toggle.
*
* @author FAT Media
* @link http://youneedfat.com/genesis-responsive-design-menu/
@nhatdong
nhatdong / stolen-sidebar.js
Created November 29, 2013 15:57 — forked from robneu/stolen-sidebar.js
Scrolling side with check width
jQuery(document).ready(function($){
// Optimalisation: Store the references outside the event handler:
var $window = $(window);
var offset = $("#sidebar").offset();
var topPadding = 30;
function checkWidth() {
var windowsize = $window.width();
if (windowsize > 960) {
<?php
/** Display Social Buttons on single post page */
add_action( 'genesis_before_post_content', 'add_social_buttons' );
add_action( 'genesis_after_post_content', 'add_social_buttons' );
function add_social_buttons() {
if ( is_single() ) {
?>
<!-- AddThis Button BEGIN -->