Skip to content

Instantly share code, notes, and snippets.

View jillmugge's full-sized avatar

Jill jillmugge

View GitHub Profile
@jillmugge
jillmugge / Longshade
Created April 22, 2014 14:45
Longshade flat icon in CSS
/* Google Font flat longshade Icon in pure css
Create with love by @LukyVj
Inspired by so much people an works over the internet.
*/
@import url(http://fonts.googleapis.com/css?family=Marck+Script);
body {
-webkit-font-smoothing: antialiased;
background: #333;
overflow: hidden;
@jillmugge
jillmugge / CPT
Created April 22, 2014 14:46
Custom Post Types
<?php
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Product', 'text_domain' ),
'parent_item_colon' => __( 'Parent Product:', 'text_domain' ),
'all_items' => __( 'All Products', 'text_domain' ),
@jillmugge
jillmugge / Edit Meta Boxes
Created April 22, 2014 14:47
Editing the meta boxes in the dashboard
<?php
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
//Right Now - Comments, Posts, Pages at a glance
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
//Recent Comments
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
//Incoming Links
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
@jillmugge
jillmugge / Debug
Created April 22, 2014 14:48
Debug site
<?php
function list_hooked_functions($tag=false){
global $wp_filter;
if ($tag) {
$hook[$tag]=$wp_filter[$tag];
if (!is_array($hook[$tag])) {
trigger_error("Nothing found for '$tag' hook", E_USER_WARNING);
return;
}
}
@jillmugge
jillmugge / Deflate .htaccess
Created April 22, 2014 14:48
Deflate .htaccess for speed
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
@jillmugge
jillmugge / jQuery - add div for parallax
Last active August 29, 2015 14:00
Add Div to Builder (outside of Container) for parallax scroll
function parallax(){
var scrolled = jQuery(window).scrollTop();
jQuery('.custom-bg').css('left', -(scrolled * 0.2) + 'px');
jQuery('.custom-bg').css('top', -(scrolled *0.3) + 'px');
}
jQuery(window).scroll(function(e){
parallax();
});
@jillmugge
jillmugge / enqueue vidBG - jQuery
Created April 22, 2014 14:52
enqueue jquery.videoBG
<?php
function load_custom_scripts(){
wp_register_script( 'jquery.videoBG', get_stylesheet_directory_uri() . '/js/jquery.videoBG.js', array('jquery'));
wp_enqueue_script( 'jquery.videoBG' );
}
add_action( 'wp_enqueue_scripts', 'load_custom_scripts' );
@jillmugge
jillmugge / Event Manager Tweeks
Created April 22, 2014 14:53
Event Manager CSS Tweeks
/*****************************************************
Custom CSS for Tweaking Events Manager Webinar
*****************************************************/
#builder-module-525c349e97bee-background-wrapper {
background: url(images/events-bkgd.jpg) no-repeat center top;
background-size: cover;
color: #fff;
padding-top: 50px;
}
@jillmugge
jillmugge / excerpt length
Created April 22, 2014 14:53
Change the excerpt length
<php
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
@jillmugge
jillmugge / PODS Export
Created April 22, 2014 14:54
PODS Export
{"meta":{"version":"2.3.8","build":1372866920},"pods":{"30":{"type":"pod","id":30,"name":"bookmark","label":"Bookmarks","description":"","storage":"table","object":"","alias":"","fields":{"name":{"id":31,"name":"name","label":"Name","description":"","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_repeatable":"0","unique":"0","text_max_length":"255","text_allowed_html_tags":"strong em a ul ol li b i"},"url":{"id":36,"name":"url","label":"URL","description":"","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","text_max_length":"255","text_allowed_html_tags":"strong em a ul ol li b i","text_allow_html":"0","text_allow_shortcode":"0","text_repeatable":"0","unique":"0","required":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","roles_allowed":["administrator"]},"section":{"id":37,"name":"section","label":"Section","description":"","help":"","class":"","type":"pick","weight":2,"