Skip to content

Instantly share code, notes, and snippets.

davechu

Block or report user

Report or block davechu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gokulkrishh
gokulkrishh / media-query.css
Last active Apr 3, 2020
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@pasadamedia
pasadamedia / gist:c18d5cd135ddb5085ed0
Last active Mar 23, 2018
Display WooThemes Sensei comments and messages in a Genesis framework child theme. Insert in your child theme's functions.php file.
View gist:c18d5cd135ddb5085ed0
/**
* Remove Sensei comments output and replace with comments done the Genesis way.
*
* @notes Extends the WooThemes_Sensei_Frontend class.
*
*/
if (class_exists('WooThemes_Sensei_Frontend')) {
remove_action( 'sensei_comments', array( $woothemes_sensei->frontend, 'sensei_output_comments' ), 10 );
add_action( 'sensei_comments', array( 'WooThemes_Sensei_Frontend_Comments', 'pasada_sensei_output_comments' ), 10 );
View gist:3b19447b304616f18657
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
View functions.php
<?php
/**
* Intro Content
*
*/
function be_intro_content() {
if( is_page() )
$intro = get_post_meta( get_the_ID(), 'be_intro_content', true );
if( is_home() )
@robneu
robneu / genesis-nav-space-fix.css
Last active May 21, 2018
Remove unwated space from nav elements on Genesis themes.
View genesis-nav-space-fix.css
/**
* The Default Genesis styles have a bug which causes extra unwanted
* space to display in the nav menu bar elements. This will remove the
* extra space cross-browser. The reason for the strange .001px font size
* is due to a bug on older Andorid devices.
*
* Note: I've used the default Genesis styles here as an example. The only
* actual change is the font-size rule on both selectors.
*
* Reference link: http://css-tricks.com/fighting-the-space-between-inline-block-elements/
@bradpotter
bradpotter / functions.php
Last active Jul 18, 2017
How to Add “Top” and “Footer” Menus to Genesis
View functions.php
// Register and Hook Top Navigation Menu
add_action('genesis_before_header', 'sample_before_header_menu', 10);
function sample_before_header_menu() {
register_nav_menu( 'top', 'Top Navigation Menu' );
genesis_nav_menu( array(
'theme_location' => 'top',
'menu_class' => 'menu genesis-nav-menu menu-top',
) );
View class-woothemes-sensei-frontend.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/**
* Sensei Frontend Class
*
* All functionality pertaining to the frontend of Sensei.
*
* @package WordPress
* @subpackage Sensei
@hlashbrooke
hlashbrooke / function.php
Created Jul 14, 2014
Sensei - Disable "Pass required to complete lesson" on all lessons. Add this to your theme's functions.php file and then load any frontend page on the site. After that you must remove the code from your site.
View function.php
<?php
add_action( 'init', 'sensei_disable_pass_required_all_lessons' );
function sensei_disable_pass_required_all_lessons() {
if( is_admin() ) {
return;
}
global $woothemes_sensei;
@pmgllc
pmgllc / content_limit_tags.php
Created Jul 3, 2014
Allow HTML tags in content limit
View content_limit_tags.php
<?php
add_filter( 'get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags' );
/**
* @author Brad Dalton
* @example http://wp.me/p1lTu0-a5w
*/
function get_the_content_limit_custom_allowedtags() {
// Add custom tags to this string
return '<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>';
@DustonMcGroarty
DustonMcGroarty / genesis-sales-page.php
Last active Jul 14, 2019
Genesis Sales Page Template
View genesis-sales-page.php
<?php
/*
Template Name: Sales Page
*/
//* Add custom body class to the head
add_filter( 'body_class', 'dm_add_body_class' );
function dm_add_body_class( $classes ) {
$classes[] = 'dm-sales';
You can’t perform that action at this time.