Skip to content

Instantly share code, notes, and snippets.

View landru247's full-sized avatar

Landru landru247

  • Earth
View GitHub Profile
@landru247
landru247 / Bootstrap.html
Created June 26, 2014 16:26
Bootstrap Boilerplate html template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
@landru247
landru247 / css.css
Created April 23, 2014 18:19
Bootstrap: 5 col grid - adds new grid pattern to bootstrap (5 col)
.col-sm-15,
.col-md-15,
.col-lg-15 {
position: relative;
min-height: 1px;
padding-right: 10px;
padding-left: 10px;
}
.col-xs-15 {
@landru247
landru247 / Demo.html
Created April 18, 2014 23:02
CSS: Off stage menu - Simple slide in off-stage menu Credit: Pushy - v0.9.1 - 2013-9-16 | Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. https://github.com/christophery/pushy | by Christopher Yee
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Pushy - Off-Canvas Navigation Menu</title>
<meta name="description" content="Pushy is an off-canvas navigation menu for your website.">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/demo.css">
@landru247
landru247 / CSS: Callout - with dropshadow
Created April 14, 2014 23:14
CSS: Callout - with dropshadow
.call-out {
background: #fff;
margin: 0 auto;
padding: 20px;
position: relative;
box-shadow: 0 3px 7px rgba(0,0,0,0.4);
border-radius: 5px;
border-top: solid 1px #e3e3e3;
}
@landru247
landru247 / WordPress: Truncate.php
Created April 8, 2014 20:13
WordPress: Truncate - By character count
<?php echo substr(strip_tags($post->post_content), 0, 400);?>
@landru247
landru247 / WordPress: get list of terms
Last active August 29, 2015 13:58
WordPress: get list of terms - Puts a list of Terms (taxonomies) in a <ul> and does not add <a> links
<!-- if in a loop -->
<?php
$terms_as_text = strip_tags(get_the_term_list($wp_query->post->ID, 'tmc_works', '', ', ', ''));
echo $terms_as_text;
?>
<!-- or -->
<?php echo '<ul>'; ?>
@landru247
landru247 / Contact Form 7: validation.css
Created April 2, 2014 16:55
Contact Form 7: validation - removes the error/success message and removes the default field validation and replaces with colored fields
div.wpcf7-response-output, div.wpcf7-validation-errors { display: none !important; }
span.wpcf7-not-valid-tip { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: red; background-color: rgba(153,0,0,0.3); }
@landru247
landru247 / PHP: Sendmail test.php
Created February 14, 2014 18:22
PHP: Sendmail test - run script to test php sendmail function
<?php /* change to email address(s) */ ?>
<? $headers = 'From: webmaster@example.com'; mail('nobody@example.com', 'Test email using PHP', 'This is a test email message', $headers, '-fwebmaster@example.com'); ?>
@landru247
landru247 / WordPress: Single CPT conditional.php
Created February 5, 2014 22:12
WordPress: Single CPT conditional - if (is_singular('job_posts'))
<?php if (is_singular('job_posts')) { ?>
<!-- markup here -->
<?php } ?>
@landru247
landru247 / CSS: font-rendering.css
Created January 29, 2014 17:52
CSS: font-rendering - short stack of html tags that can affect text rendering.
html, button, input, select, textarea { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }