Skip to content

Instantly share code, notes, and snippets.

@robneu
robneu / disable-wp-featherlight-singular-posts.php
Created November 10, 2015 02:06
Code snippet to disable the WP Featherlight plugin on singular posts.
add_action( 'wp_enqueue_scripts', 'sitecare_disable_featherlight_singular_posts' );
/**
* Disable WP Featherlight on singular post entries.
*
* @author WP Site Care <http://www.wpsitecare.com/>
* @access public
* @return void
*/
function sitecare_disable_featherlight_singular_posts() {
if ( is_singular( 'post' ) ) {
// Store the original Neat gutter size.
$orig-fg-gutter: $fg-gutter;
// Temporarily override the Neat gutter.
$fg-gutter: 0.5em;
.some-element {
@include span-columns(6);
}
.some-other-element {
@robneu
robneu / table-grid.scss
Last active August 29, 2015 14:14
Create a mobile-first, gutterless grid system using Sass
/* Table Grid Classes
--------------------------------------------- */
@media screen and (min-width: 810px) {
%table-grid {
display: block;
float: left;
}
<?php
add_action( 'flagship_dashboard_main_panel_content', 'prefix_getting_started' );
/**
* Add helper content to the main Flagship Dashboard panel.
*
* @since 1.0.0
* @access public
* @return void
*/
@robneu
robneu / mdp_info.php
Created September 26, 2014 04:50
This is code from the Local Business SEO plugin by Christopher Dubeau. It is intended to add local business schema data to your website, which is great. The problem is that this plugin ranomly injects links to websites that I'm guessing benefit Christopher in some way. The code for doing this can be found from line 492 to line 522 Not cool. The …
<?php
/*
* Class for displaying the local business information
*/
if (!class_exists('LocalBusiness')) {
class LocalBusiness
{
// This file controls all base color styles for our theme. All colors should be
// defined in _colors.scss. This allows us to at a glance determine global color
// styles of our theme and prevents arbitrary color assignment.
// Do not use the base theme colors in the scss partial files! Set up your theme's
// base colors and then use scoped color values in your Sass partials.
// Theme Colors (private vars)
//------------------------------------------------------------------------------
$off-black: #1c1e1f;
$dark-gray: #494b4c;
<?php
/**
* Simple Grid helper functions.
*
* @package SimpleGrid
* @subpackage Genesis
* @copyright Copyright (c) 2014, Flagship, LLC
* @license GPL-2.0+
* @since 1.0.0
*/
<?php
/**
* This file adds the Home Page to the Tidy Theme.
*/
add_action( 'genesis_meta', 'tidy_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
<?php
/**
* Plugin Name: Remove H1 Format
* Plugin URI: http://calliaweb.co.uk/modify-tinymce-editor/
* Description: A simple plugin to remove the H1 format from the WordPress TinyMCE editor.
* Version: 0.0.1
* Author: Jo Waltham
* Author URI: http://calliaweb.co.uk/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@robneu
robneu / genesis-nav-space-fix.css
Last active May 21, 2018 20:45
Remove unwated space from nav elements on Genesis themes.
/**
* The Default Genesis styles have a bug which causes extra unwanted
* space to display in the nav menu bar elements. This will remove the
* extra space cross-browser. The reason for the strange .001px font size
* is due to a bug on older Andorid devices.
*
* Note: I've used the default Genesis styles here as an example. The only
* actual change is the font-size rule on both selectors.
*
* Reference link: http://css-tricks.com/fighting-the-space-between-inline-block-elements/