Skip to content

Instantly share code, notes, and snippets.

View digisavvy's full-sized avatar

Alex Vasquez digisavvy

View GitHub Profile
@digisavvy
digisavvy / genesis-site-title-change
Created November 5, 2014 17:45
Genesis SIte Title Text Filter
// Filter the title with a custom function
add_filter('genesis_seo_title', 'gmugeo_site_title' );
// Add additional custom style to site header
function gmugeo_site_title( $title ) {
// Change $custom_title text as you wish
$custom_title = '<span class="custom-title">Custom Title Text';
@digisavvy
digisavvy / check-title-tag-support
Created December 26, 2014 22:23
Checking for 'title-tag' support
// Adding Theme title tag support
function digistarter_title_tag_support() {
if ( current_theme_supports( 'title-tag' ) ) {
add_theme_support('title-tag');
} else { ?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php }
}
add_action( 'tha_head_bottom', 'digistarter_title_tag_support');
@digisavvy
digisavvy / gist:20792638abf81930187f
Created March 19, 2015 05:38
Jetpack carousel fun
// Image Markup
<dl class="gallery-item">
<dt class="">
<a href="//localhost:3000/shows/uncle-vanya/deathtostock_neighbors5/">
<img width="1024" height="683" src="//localhost:3000/wp-content/uploads/2015/03/DeathtoStock_Neighbors5-1024x683.jpg" class="attachment-large" alt="DeathtoStock_Neighbors5" data-attachment-id="3708" data-orig-file="//localhost:3000/wp-content/uploads/2015/03/DeathtoStock_Neighbors5.jpg" data-orig-size="4927,3285" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;1.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon EOS 5D Mark III&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1426070992&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;50&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.01&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="DeathtoStock_Neighbors5" data-image-description="" data-medium-file="//localhos
@digisavvy
digisavvy / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@digisavvy
digisavvy / javascript_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@digisavvy
digisavvy / css_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@digisavvy
digisavvy / wp_query_has_caps.php
Last active August 29, 2015 14:19
WP Query to display posts current user has capabilities to see
<?php
$args = array(
'post_type' => 'course',
'perm' => 'readable',
'order' => 'ASC',
'orderby' => 'title',
'posts_per_page' => -1,
'READ_ACCESS' => 'read_access',
'post__not_in' => array( 1271 )
@digisavvy
digisavvy / ninja-forms-foobox-popup.php
Last active August 29, 2015 14:20
Ninja Forms and Foobox Popup
<?php
if( function_exists( 'ninja_forms_display_form' ) ){
echo '<div id="ninja_form" style="display: none;">';
echo "<h3>Class Enrollment Inquiry Form</h3>";
ninja_forms_display_form( 1 );
echo "</div>";
}
?>
<span class="white-cta">
<a href="#ninja_form" target="foobox" data-width="600px" class="white-cta">Enroll Now</a>
.search-box-wrapper .search-field {
box-sizing: border-box;
width: 280px;
}
dev-antaeus.artedev.info/media="all"
.search-box-wrapper .search-field {
z-index: 1;
position: absolute;
float: none;
@digisavvy
digisavvy / new_gist_file.php
Created May 5, 2015 19:45
Ninja Forms Filter
// Pre-Populate Talent Inquiry Form
function digisavvy_pre_pop_talent_title( $data, $field_id ){
global $ninja_forms_processing;
// Get the current form_id
$form_id = $ninja_forms_processing->get_form_ID(); // Gets the ID of the form we are currently processing.
// If the form_id is the form we want
if( $form_id == 5 ){
if( $field_id == 3 ){
$data['default_value'] = get_the_title();
}