Skip to content

Instantly share code, notes, and snippets.

@nickdavis
nickdavis / column-opening-div-class-examples.html
Created April 23, 2014 14:40
HTML Columns Opening Div Class examples for LeanThemes.co
<!-- For the first column you must include 'first' -->
<div class="pricing-column one-half first">
<div class="pricing-column one-third first">
<div class="pricing-column one-fourth first">
<!-- For later columns do not include 'first' -->
<div class="pricing-column one-half">
<div class="pricing-column one-third">
<div class="pricing-column one-fourth">
@nickdavis
nickdavis / genesis-simple-edits.html
Created April 23, 2014 14:47
Genesis Simple Edits plugin 'Footer Output' example for Lean Kickstart by LeanThemes.co
<p>
<span class="alignleft">Copyright [footer_copyright] <a href="http://leanthemes.co/themes/kickstart/">Kickstart Theme</a> built on the [footer_genesis_link] and [footer_wordpress_link]</span>
<span class="alignright">Theme by D&N at <a href="http://leanthemes.co">Lean Themes</a></span>
</p>
@nickdavis
nickdavis / custom-text.html
Created April 24, 2014 08:30
User Profile widget 'Custom Text' example for 'Lean Splash' theme by LeanThemes.co
<h4>Derry «pixelpusher» Birkett</h4>
Design
@nickdavis
nickdavis / wp-config.php
Created July 18, 2014 08:36
How to define Genesis as the default theme on WordPress multisite
define( 'WP_DEFAULT_THEME', 'genesis' );
@nickdavis
nickdavis / .htaccess
Created July 18, 2014 08:41
Redirect local WordPress development environment media files to show live site media files instead (to save downloading them all)
#301 Redirect Entire Directory
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livesiteurl.com/wp-content/uploads/$1
<?php
/**
* This file customizes the Homepage output for the Aua Med School Theme.
*
* @author Halflife Studios
* @package Aua Med School
* @subpackage Customizations
*/
add_action('get_header', 'auamed_home_enqueue_scripts');
@nickdavis
nickdavis / template-iframe.php
Created October 21, 2014 19:28
Add a 'full width' iFrame (WordPress) page template using a custom field for the iFrame URL and including Genesis scripts (if set) in the header
<?php
// Template Name: iFrame
/**
* Get the URL for the iFrame from a custom field
*
* @link http://www.billerickson.net/advanced-custom-fields-frontend-dependency/
*/
$url = esc_url( get_post_meta( get_the_ID(), 'iframe', true ) );
@nickdavis
nickdavis / style.css
Last active May 21, 2017 22:49
Center 'Simple Social Icons' via CSS (useful on responsive designs where the icons are initially left or right aligned and you want them centred on smaller screens)
/* Place the following at the point you want to center them in your CSS file, e.g. after the 1023 or 768px media query */
.simple-social-icons ul {
float: none;
text-align: center;
}
.simple-social-icons ul li {
display: inline-block;
float: none !important;
@nickdavis
nickdavis / style.css
Created October 27, 2014 21:41
Make AgentPress Pro homepage background scroll WITH the content instead of having the content scroll over it (add to the end of your style.css file)
.backstretch {
position: static !important;
}
@nickdavis
nickdavis / menu-reorder.js
Created January 19, 2015 10:30
An idea on reordering floated menu items to respect their originally intended order (open to improvement!)
jQuery(function( $ ){
/* Reorder Menu */
// If page loads in 'non-mobile' mode reorder our floated menu items
if(window.innerWidth > 800) {
menu_reorder();
$("body").addClass("menu-reordered");
}
else {