Skip to content

Instantly share code, notes, and snippets.

View cliftoncanady's full-sized avatar

cliftoncanady

View GitHub Profile
@cliftoncanady
cliftoncanady / CSS: FontAwesome Wiget Snippet
Created August 21, 2014 21:03
CSS: FontAwesome Wiget Snippet
span.title {
position: relative;
font-size: 1rem;
margin-bottom: 5px;
margin-left: 40px;
color: #000;
}
span.title:before {
content: "\f087";
font-family: FontAwesome;
@cliftoncanady
cliftoncanady / WP SNIPPET: git_template_part
Created July 11, 2014 04:42
WP SNIPPET: git_template_part
<?php get_template_part('front', 'home'); ?>
<?php get_template_part('front', 'about'); ?>
@cliftoncanady
cliftoncanady / WP SNIPPET: Menu Item Image Replacement
Created July 9, 2014 19:02
WP SNIPPET: CSS class - will replace wp menu item with image.
/*Things to change -
* -menu-item-####
* -width: 106px;
* -height: 54px;
* -margin-top: 34px;
* -background-image:url();
**/
li#menu-item-3002 a {
display: block;
@cliftoncanady
cliftoncanady / WP SNIPPET: OnePage wp_query
Created July 5, 2014 20:56
WP SNIPPET: OnePage wp_query
<?php
global $wp_query;
// is Page a parent page
if ( $post->post_parent == 0 ) {
// on a parent page, get child pages
$pages = get_pages( 'hierarchical=0&parent=' . $post->ID );
// loop through child pages
foreach ( $pages as $post ){
setup_postdata( $post );
// get the template name for the child page
@cliftoncanady
cliftoncanady / WP SNIPPET: CPT slug rewrite
Created June 30, 2014 23:43
WP SNIPPET: CPT slug rewrite
/**
* Remove the slug from published post permalinks.
* Only affect our CPT though.
*/
function wevaweb_remove_cpt_slug( $post_link, $post, $leavename ) {
if ( ! in_array( $post->post_type, array( 'ait-dir-item' ) )
|| 'publish' != $post->post_status )
return $post_link;
@cliftoncanady
cliftoncanady / WP SNIPPET: local-config.php
Last active August 29, 2015 14:00
WP SNIPPET: local-config.php
// Include local configuration
if (file_exists(dirname(__FILE__) . '/local-config.php')) {
include(dirname(__FILE__) . '/local-config.php');
}
<?php
/*
Plugin Name: Login Logo Custom CSS
Description: Custom CSS for the login screen
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
<head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1"><style type="text/css"> html, body, div,{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;font: 16px/20px Arial, 'Times New Roman', serif;}h1{font: bold 24px/20px Arial, 'Times New Roman', serif;text-transform: uppercase;}hr{border: 0;height: 0;border-top: 1px solid rgba(0, 0, 0, 0.1);border-bottom: 1px solid rgba(255, 255, 255, 0.3);margin: 20px;}a{color:#;}.wrapper{width: 100%;position: relative;}.logo{width:25%;float: left;}.header{background: rgb(40, 40, 40);margin: 0 auto;text-align: center;}.main{color: #444;width: 700px;min-width:700px;float: right;padding: 10px;}.main h1{color: #8CC63F;margin:10px 0px;}.main p{margin-bottom:10px;}.main ul{margin: 15px 10px 10px 30px;}.sidebar{color: #444;width: 300px;min-width:300px;float: left;}.seller-info{margin: 10px;
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
.slideLeft {
position: absolute;
left: 0;
transition: left 0.5s;
-ms-transition: -ms-left 0.5s;
-moz-transition: -moz-left 0.5s;
-webkit-transition: -webkit-left 0.5s;
}
.slideLeft:hover {