Joe Casabona is a Front End Developer that works in WordPress…a lot. In 2014, he authored a book called Responsive Design with WordPress, develops WordPress courses over at WP in One Month and has developed an accredited course on WordPress theming. He also hosts the How I Built It podcast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('woocommerce_before_cart_table', 'discount_frol_url'); | |
function discount_from_url() { | |
global $woocommerce; | |
if( 'https://wpsessions.com' == wp_get_referer() ) { | |
$coupon_code = 'WPSESSIONS'; | |
if (!$woocommerce->cart->add_discount( sanitize_text_field( $coupon_code ))) { | |
$woocommerce->show_messages(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a { | |
@include card(); | |
transition: all 1s ease; | |
@include breakpoint($bp-small, 'max') { | |
display: block; | |
margin: $margin-base; | |
} | |
&:hover, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
var method; | |
method = method || 'POST'; | |
var form = document.createElement("form"); | |
form.setAttribute("method", method); | |
form.setAttribute("action", '/'); | |
var hiddenField = document.createElement("input"); | |
hiddenField.setAttribute("type", "hidden"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
/** | |
* Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE. | |
* IE10 and up does not support conditional comments in standards mode. | |
* | |
* @uses wp_style_add_data() WordPress function to add the conditional data. | |
* @link https://developer.wordpress.org/reference/functions/wp_style_add_data/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joe Casabona is a Front End Developer that works in WordPress…a lot. He focuses primarily on taking design mockups and creating pixel perfect, well-functioning websites while also dabbling a bit in some back-end coding. Starting in 2002 at the age of 15, Joe has worked on sites for everyone from high school bands to enterprise-level companies. in 2014, he authored a book called Responsive Design with WordPress and 2 other book on web development. | |
He’s also a professor at the University of Scranton where he teaches Web Development and Computer Science courses and has developed an accredited course on WordPress theming. |
If you have multiple Google Accounts and get calendar or hangout invites to the wrong account, there's a real simple fix
https://www.google.com/calendar/b/0/render?tab=mc#main_7
Notice the '0' in the URL. That's the ID of the currently authenticated user. By changing this ID, you can view the calendar of any other authenticated user. So, for example, if you take these actions:
- You login to your GMail account, [email protected]. That is now ID: 0
- You then login to your Work account, which uses Google Apps, [email protected]. That is now ID: 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Change color of branch name | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PATH=/usr/local/sbin:$PATH | |
#Directory Aliases |