Skip to content

Instantly share code, notes, and snippets.

View tsquez's full-sized avatar

Thomas E Vasquez tsquez

View GitHub Profile
@tsquez
tsquez / block-grid
Created November 13, 2015 11:37
use this for creating stackable grids for content
<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4">
<li><!-- Your content goes here --></li>
<li><!-- Your content goes here --></li>
<li><!-- Your content goes here --></li>
<li><!-- Your content goes here --></li>
</ul
@tsquez
tsquez / Hide Orbit Timer
Created November 13, 2015 11:25
Use this to hide the timer in Orbit
/* Misc */
.orbit-timer { /* Hides the orbit timer */
left: -10000px;
top: auto;
height: 1px;
overflow: hidden;
position: absolute;
width: 1px;
}
@tsquez
tsquez / Every element that uses Open Sans
Created November 11, 2015 10:24
These are the elements in foundation.css that use the Open Sans font. I compiled this list for those of you who want to use something other than Open Sans.
body,
button,
.button,
.top-bar-section ul li > a,
.pricing-table .title,
.pricing-table .price,
.tabs .tab-title > a,
.side-nav,
.side-nav li.active > a:first-child:not(.button),
.accordion .accordion-navigation > a, .accordion dd > a,
@tsquez
tsquez / sidebar social menu code
Created September 2, 2015 09:55
Adds screen reader span class to elements of menu in main sidebar
// Adds screen reader span class to elements of menu in main sidebar
jQuery('#secondary .menu a').each(function()
{
jQuery(this).wrapInner('<span class="screen-reader-text"></span>');
});
@tsquez
tsquez / Off-Canvas WordPress Menu Output
Last active August 29, 2015 14:27 — forked from zzramesses/Off-Canvas WordPress Menu Output
Foundation Off-Canvas WordPress Menu (forked so I do not lose it)
<aside class="left-off-canvas-menu">
<?php wp_nav_menu(
array(
'theme_location' => 'the menu you want to use',
'container' => false,
'menu_id' => '',
'menu_class' => 'off-canvas-list',
'walker' => new Off_Canvas_Walker()
)
);
@tsquez
tsquez / get_stylesheet.php
Created August 8, 2015 23:35
use this to load a script or a style that is in a child theme
get_stylesheet_directory_uri()
@tsquez
tsquez / if_function_exists
Created April 18, 2015 14:29
Wrap functions in "if function_exists" statement
if ( ! function_exists( 'function_name_goes_here' ) ) {
/* function goes here */
}
@tsquez
tsquez / remove-actions
Last active August 29, 2015 14:19
Remove parent functions in WP-Forge
function your_function_name() {
remove_action( 'action name goes here' );
}
add_action( 'after_setup_theme', 'your_function_name', 9 );
@tsquez
tsquez / clean-up-wphead
Last active December 10, 2015 14:25
This will remove a lot fo unnecessary junk from the header
if ( ! function_exists( 'wpforge_head_clean' ) ) :
function wpforge_head_clean() {
// Remove the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links_extra', 3 );
// Remove the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'feed_links', 2 );
// Remove the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'rsd_link' );
// Remove the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'wlwmanifest_link' );
@tsquez
tsquez / Orbit Data Options
Last active August 29, 2015 14:08
How to set data-options for Orbit without using javascript
animation: 'slide', // Sets the type of animation used for transitioning between slides, can also be 'fade'
timer_speed: 10000, // Sets the amount of time in milliseconds before transitioning a slide
pause_on_hover: true, // Pauses on the current slide while hovering
resume_on_mouseout: false, // If pause on hover is set to true, this setting resumes playback after mousing out of slide
next_on_click: true, // Advance to next slide on click
animation_speed: 500, // Sets the amount of time in milliseconds the transition between slides will last
stack_on_small: false,
navigation_arrows: true,
slide_number: true,
slide_number_text: 'of',