Skip to content

Instantly share code, notes, and snippets.

cfxd / dabblet.css
Last active Dec 20, 2015 — forked from oksushi/dabblet.css
Tableless horizontal navigation bar with padding and even spacing; no space between elements, no unused container space, and no fixed width (so works for any number of elements!).Fiddle at
View dabblet.css
* Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li>
ul {
padding: 0;
display: table;
width: 100%;
table-layout: fixed;
cfxd / flexslider-with-bootstrap-mixins.less
Last active Aug 29, 2015
FlexSlider v2.2.0 default styles in LESS
View flexslider-with-bootstrap-mixins.less
/* Includes Bootstrap mixins!
/* Browser Resets
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus { outline: none; }
View tax_cpt_filter_class.php
if (!class_exists('Tax_CTP_Filter')){
* Tax CTP Filter Class
* Simple class to add custom taxonomy dropdown to a custom post type admin edit list
* @author Ohad Raz <>
* @version 0.1
class Tax_CTP_Filter
cfxd / no-thanks-godaddy.txt
Last active Jun 28, 2017
GoDaddy® Clause I use in all of my client agreements
View no-thanks-godaddy.txt
<MY BIZ NAME> chooses not to do business with and will not perform site deployments to, site maintenance on, or site migrations to GoDaddy® or its affiliates (including MediaTemple®) due to its unwieldy hosting platform, its past CEO's inhumane treatment of animals, its deceptive and sexist advertising practices, and its past support for SOPA (the proposed invasive intellectual property rights bill which prompted Reddit, Wikipedia, and others to shut down their sites in protest).
For more details, please see and
Clients already hosted with GoDaddy may secure more reliable, user-friendly, and ethical hosting through <YOUR PREFERRED REFERRAL HOSTS>.
cfxd / selection.less
Last active Aug 29, 2015
LESS Mixin to change selection color
View selection.less
.selection(@color; @bg) {
&::selection {
-webkit-font-smoothing: antialiased;
color: @color;
text-shadow: none;
background: @bg;
background: fadeout(@bg, 1%);
&::-moz-selection {
-webkit-font-smoothing: antialiased;
cfxd / chosenjs-less-for-bootstrap-and-woocommerce-checkout.less
Last active Aug 29, 2015
This will style WooCommerce's ChosenJS select boxes on the WooCommerce checkout page to match your existing Bootstrap form styles (assuming you've made any style changes in LESS) and even replaces the default background images with Bootstrap's built in Glyphicons.
View chosenjs-less-for-bootstrap-and-woocommerce-checkout.less
// first some helpful mixins
.abs {
position: absolute;
.rel {
position: relative;
.position(@top; @right; @bottom; @left) {
top: @top;
right: @right;
cfxd / wpcf7_dynamic_email_field.php
Last active Jul 6, 2016
WordPress Contact Form 7 filter: set your contact form's "To:" field to "%admin%" to automatically use the site admin email dynamically. See
View wpcf7_dynamic_email_field.php
function wpcf7_dynamic_email_field($args) {
if(!empty($args['recipient'])) {
$args['recipient'] = str_replace('%admin%', get_option('admin_email'), $args['recipient']);
return $args;
return false;
add_filter('wpcf7_mail_components', 'wpcf7_dynamic_email_field');
View test-plugin.php
* Plugin Name: AA Test Plugin
* Plugin URI:
* Description: Testing all kinds of things!
* Author: Richard Archambault
* Version: 1.0
* License: GPL2+
cfxd / .htaccess
Last active Oct 1, 2018
Deploy WordPress (Bedrock) with Capistrano to a Shared Host (Bluehost). See
View .htaccess
RewriteEngine on
#change to your domain name
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{REQUEST_URI} !^/current/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /current/web/$1
#change to your domain name
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteRule ^(/)?$ current/web/index.php [L]
cfxd / passwordform-bootstrap.php
Last active Aug 29, 2015
Roots theme password protected post form function. Use the Bootstrap free markup with the Bootstrap LESS or use the Bootstrap markup version as standalone.
View passwordform-bootstrap.php
global $post;
$label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
<form action="<?php echo esc_url(site_url('wp-login.php?action=postpass', 'login_post')); ?>" class="post-password-form form-inline" method="post">
<p><?php _e('This content is password protected. To view it please enter your password below:', 'roots'); ?></p>
<p><label for="<?php echo $label; ?>" class="sr-only"><?php _e('Password:', 'roots'); ?></label></p>
<div class="input-group">
<input name="post_password" id="<?php echo $label; ?>" type="password" placeholder="<?php _e('Enter password', 'roots'); ?>" class="form-control" />
<span class="input-group-btn">
You can’t perform that action at this time.