Skip to content

Instantly share code, notes, and snippets.

@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;
@srikat
srikat / code.php
Last active October 17, 2017 17:28
How to display full width Featured image below Header in Minimum Pro. http://sridharkatakam.com/display-featured-image-header-minimum-pro/
<?php
//* Do NOT include the opening php tag
/**
* Get featured image markup.
*
* Only when the single Post or Page has a featured image, and only when
* showing the first page when the Page or Post is divided into multiple
* pages using next page quicktag.
*
@srikat
srikat / functions.php
Last active January 5, 2016 05:54
App style off-canvas menus and sidebars using Slidebars in Genesis. http://sridharkatakam.com/app-style-canvas-menus-sidebars-using-slidebars-genesis/
//* Add #sb-site to .site-container div
add_filter( 'genesis_attr_site-container', 'custom_genesis_attributes_entry' );
/**
* Add attributes for entry element.
*
* @since 2.0.0
*
* @param array $attributes Existing attributes.
*
* @return array Amended attributes.
@neilgee
neilgee / mod-primary-nav.php
Last active December 4, 2015 07:28
Reposition Genesis Primary Navigation to Header Right Widget and Remove Structural Wrap
<?php
//do not copy the opening php tag above
/**
* Swap Primary Nav to Header Right and Remove Wrap
*
* @package Swap Primary Nav
* @author Neil Gee
* @link http://coolestguidesontheplanet.com/switching-primary-menu-genesis-theme-header-right/
* @copyright (c) 2014, Neil Gee
<?php
/* Template Name: Sales
----------------------------------*/
//* Enqueue scripts and styles
add_action( 'wp_enqueue_scripts', 'cegg_image_load_scripts_styles' );
function cegg_image_load_scripts_styles() {
if ( has_post_thumbnail() ) {
@elijahmanor
elijahmanor / CSS-Animated-Hamburger-Icon.markdown
Last active February 21, 2018 02:35
A Pen by Elijah Manor.
@neilgee
neilgee / front-page.php
Last active August 29, 2016 02:52
Genesis Remove Home Page Content
<?php //<~ Add me in
add_action( 'genesis_before_content', 'ng_home_page_widgets' );
/*
* Add the home widgets in place
*/
function ng_home_page_widgets() {
genesis_widget_area ('content-1', array(
@neilgee
neilgee / a-cpt.php
Last active July 27, 2022 14:05
CPT (Custom Post Type) - WordPress Plugin - there are 2 snippets here - the one name - cpt-hide.php hides the single and archive views, the other one is normal
<?php
/*
Plugin Name: Testimonials Custom Post Type
Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/
Description: Testimonials Custom Post Types
Author: Neil Gowran
Version:1.0.0
Author URI:http://wpbeaches.com
*/
@studiopress
studiopress / pricing-table.html
Created February 3, 2014 06:23
Parallax Pro Pricing Table
<p>Our SEO services are among the very best in the industry.</p>
<div class="pricing-table">
<div class="one-third first">
<h4>Basic - $95</h4>
<ul>
<li>List Item #1</li>
<li>List Item #2</li>
<li>List Item #3</li>
@ozzyrod
ozzyrod / responsive-menu-css.css
Last active April 23, 2019 05:54
Creates a mobile responsive menu in a Genesis child theme with support for collapsible sub menus.
/* Responsive Navigation
---------------------------------------------------------------------------------------------------- */
/* Standard Navigation
--------------------------------------------- */
nav {
clear: both;
}