Skip to content

Instantly share code, notes, and snippets.

@musicalbigfoot
musicalbigfoot / gist:e3fbc3a211da6ae5365c
Created March 24, 2015 17:16
WordPress: Custom Post Type Query
<?php
$__POST_display = array();
$args = array(
'post_type' => '__POST',
'posts_per_page' => -1,
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
if (isset($image[0]) && $image[0] != "") {
add_action('admin_menu', 'cwa_create_menu');
function cwa_create_menu() {
add_menu_page( 'Map Settings', 'Map Settings', 'manage_options', 'cwa-map-settings', 'cwa_settings_page', 'dashicons-location-alt', 61);
}
add_action( 'admin_init', 'register_cwasettings' );
function register_cwasettings() {
// register_setting( 'ew-settings-general', 'cwa_analytics_code' );
register_setting( 'cwa-settings', 'map_center_lat' );
@musicalbigfoot
musicalbigfoot / gist:42490990ec0ea303cac3
Created March 4, 2015 18:12
SASS Animation Function variable
$animation-funciton: cubic-bezier(0.645, 0.045, 0.355, 1.000);
@musicalbigfoot
musicalbigfoot / gist:6422d8708396f8243f63
Created January 20, 2015 21:35
remove quick edit links
//removes quick edit from custom post type list
function remove_quick_edit( $actions ) {
global $post;
if( $post->post_type == 'dogs' ) {
unset($actions['inline hide-if-no-js']);
}
return $actions;
}
if (is_admin()) {
transition: all .2s ease-in-out;
<h1>Headline 1 Text Example</h1>
<h2>Headline 2 Text Example</h2>
<h3>Headline 3 Text Example</h3>
<h4>Headline 4 Text Example</h4>
<h5>Headline 5 Text Example</h5>
<h6>Headline 6 Text Example</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <strong>Sed lacinia rutrum</strong> finibus. Morbi convallis ut ante id faucibus. Vivamus dui augue, venenatis eget rhoncus in, ornare eget neque. Ut elementum convallis pellentesque. <a href="#" title="test link">Suspendisse a hendrerit</a> diam. Etiam orci velit, egestas vel luctus volutpat, scelerisque nec metus. <em>Interdum et malesuada</em> fames ac ante ipsum primis in faucibus. Nunc ultricies diam eu euismod tempor. Proin fringilla est eget neque mattis, id convallis neque placerat.</p>
<blockquote>Vivamus eget purus eu urna auctor feugiat. Donec libero libero, condimentum quis tincidunt ut, luctus vel augue. Praesent tellus nulla, dapibus ut sollicitudin sed, feugiat a nisl. Duis finibus elit elit, ac fringilla ante gravida eget. Ut quis lorem v
@musicalbigfoot
musicalbigfoot / gist:9183836
Created February 24, 2014 08:26
CSS: Vert Aligned (not class, just params)
position: relative;
top: 50%;
transform: translateY(-50%);
@musicalbigfoot
musicalbigfoot / gist:8810321
Created February 4, 2014 19:16
jQuery: Effect highlight, custom color
.effect('highlight',{color:'#FF00FF'},1000);
@musicalbigfoot
musicalbigfoot / gist:8714320
Created January 30, 2014 17:44
CSS: Border-box box-sizing
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
@musicalbigfoot
musicalbigfoot / gist:8480681
Created January 17, 2014 20:20
CSS: Vertically Centered
.vertical-centered {
position: relative;
top: 50%;
transform: translateY(-50%)
}