Skip to content

Instantly share code, notes, and snippets.

View riceguitar's full-sized avatar

David Sudarma riceguitar

  • California
View GitHub Profile
#desktop-navigation .container {
position: relative;
padding: 15px;
@media screen and (min-width: 1200px) {
width: 1140px;
}
}
#desktop-navigation .gold-border {
.desktop-menu-wrap {
display: block;
width: 100%;
height: 100%;
position: relative;
transform: translateX(0);
transition: .3s ease all;
}
.desktop-menu-wrap.open {
jQuery(function($) {
// Toggles the Open Class so that CSS can take care of animating on and off the canvas
$('.desktop-menu-toggle').click(function() {
$('.desktop-menu-wrap').toggleClass('open');
});
});
<?php
// Creates New Nav/Menus
register_nav_menus( array(
'desktop_large' => 'Primary Large Desktop Menu',
'desktop_small' => 'Smaller Desktop Menu',
));
// Places the HTML high up into the DOM
<div>
<nav class="left-global-nav">
<ul>
<li><a href=""></a></li>
<li><a href=""></a></li>
</ul>
</nav>
<div class="right-global-nav-content">
<ul class="continent-list">
<li class="heading"></li>
<?php
/**
* Require last name for EDD purchases
**/
function pw_edd_purchase_form_required_fields( $required_fields ) {
$required_fields['edd_last'] = array(
'error_id' => 'invalid_last_name',
'error_message' => __( 'Please enter your last name.', 'edd' )
);
return $required_fields;
@riceguitar
riceguitar / walker-christmas.html
Last active October 16, 2015 22:40
Walker Christmas HTML
<!-- Video Section -->
<section id="wcc-tour-video" class="section-video">
<div class="video-container">
<iframe
width="1280"
height="720"
frameborder="0"
allowfullscreen
src="https://www.youtube.com/embed/NxHzMP58fcM?showinfo=0&rel=0"
></iframe>
@riceguitar
riceguitar / walker-christmas.less
Last active October 16, 2015 22:37
Walker Christmas Less
// Media Query Shortcuts //
@tablet: ~"only screen and (min-width: 768px)";
@desktop: ~"only screen and (min-width: 992px)";
@large-desktop: ~"only screen and (min-width: 1200px)";
/* Video Area */
#wcc-tour-video {
// Change Author URL Slug
add_filter( 'query_vars', 'wpleet_rewrite_add_var' );
function wpleet_rewrite_add_var( $vars )
{
$vars[] = 'user';
return $vars;
}
add_rewrite_tag( '%user%', '([^&]+)' );
add_rewrite_rule(
@riceguitar
riceguitar / gist:634f0cec9259cdea9310
Last active August 29, 2015 14:24
Genesis - Reverse Post Order
/** Replace the standard loop with our custom loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_do_custom_loop' );
function child_do_custom_loop() {
global $paged; // current paginated page
global $query_args; // grab the current wp_query() args
$args = array(
'order' => ASC, // exclude posts from this category