Skip to content

Instantly share code, notes, and snippets.

@gokulkrishh
gokulkrishh / media-query.css
Last active April 23, 2024 08:01
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@pasadamedia
pasadamedia / gist:c18d5cd135ddb5085ed0
Last active March 23, 2018 19:46
Display WooThemes Sensei comments and messages in a Genesis framework child theme. Insert in your child theme's functions.php file.
/**
* 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 );
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" ],
<?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 20:45
Remove unwated space from nav elements on Genesis themes.
/**
* 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 July 18, 2017 08:26
How to Add “Top” and “Footer” Menus to Genesis
// 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',
) );
<?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 July 14, 2014 15:44
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.
<?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 July 3, 2014 18:07
Allow HTML tags in content limit
<?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 July 14, 2019 20:46
Genesis Sales Page Template
<?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';