This file contains 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 | |
/** | |
* Recurring Events | |
* | |
* @package BE-Events-Calendar | |
* @since 1.0.0 | |
* @link https://github.com/billerickson/BE-Events-Calendar | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2014, Bill Erickson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
This file contains 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
body { font-family: Arial, sans-serif; } | |
.amp-wp-header { background: none; overflow: hidden; } | |
.amp-wp-header div { overflow: hidden; padding-bottom: 0; } | |
.amp-wp-title, h2, h3, h4 { font-weight: 400; } | |
.amp-wp-header a.amp-logo { | |
background: url(https://302mzo3s6lif441niv3xmjco-wpengine.netdna-ssl.com/wp-content/themes/nationaldebtrelief/images/logo-280.png) no-repeat; | |
margin: 0; | |
padding: 0; | |
width: 150px; | |
height: 45px; |
This file contains 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 | |
//Insert ads after second paragraph of single post content. | |
add_filter( 'the_content', 'prefix_insert_post_ads' ); | |
function prefix_insert_post_ads( $content ) { | |
$ad_code = '<div>Ads code goes here</div>'; | |
if ( is_single() && ! is_admin() ) { | |
return prefix_insert_after_paragraph( $ad_code, 2, $content ); | |
} | |
return $content; | |
} |
This file contains 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_filter('the_content', 'hjs_insert_content_after_chars_words'); | |
function hjs_insert_content_after_chars_words($content) { | |
// only do this if post is longer than 1000 characters | |
$enable_length = 1500; | |
// insert after the first </p> after 500 characters | |
$after_character = 1500; | |
if (is_single() && strlen($content) > $enable_length) { | |
$before_content = substr($content, 0, $after_character); | |
$after_content = substr($content, $after_character); |
This file contains 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
(function ($) { | |
"use strict"; | |
/** | |
Creates an instance of Lightbox. | |
@constructor | |
@this {Lightbox} | |
@param {object} $container The container. | |
@param {object} opts Options. |
This file contains 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 | |
/* | |
Gravity Wiz // Gravity Forms // How to Modify Input Mask Placeholders for Gravity Forms | |
http://gravitywiz.com/how-to-modify-input-mask-placeholders-for-gravity-forms/ | |
*/ | |
<script type="text/javascript"> | |
setTimeout( function() { | |
jQuery( '#input_FORMID_FIELDID' ).mask( 'MASK', { placeholder: '' } ); | |
}, 500 ); |
This file contains 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 | |
/** | |
* Hire Jordan Smith // Create Product Bundles by adding coupons to cart dynamically based on products in the cart | |
* | |
* @version 1.0 | |
* @author Jordan Smith <jordan@hirejordansmith.com> | |
* @license GPL-2.0+ | |
* @link http://hirejordansmith.com/... | |
* @copyright 2016 - Hire Jordan Smith |
This file contains 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 | |
/** | |
* @snippet Add A Coupon Dynamically based on Cart Subtotal with WooCommerce | |
* @sourcecode http://hirejordansmith.com | |
* @author Jordan Smith | |
* @compatible WooCommerce 2.4.7 | |
*/ | |
add_action( 'woocommerce_before_cart', 'apply_matched_coupons' ); |
This file contains 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 | |
// Returns subtotal price ($5.00) | |
$cart_subtotal = WC()->cart->get_cart_subtotal(); | |
// Returns subtotal number value (5) | |
$cart_subtotal = WC()->cart->subtotal; | |
/*======================================== | |
Single Product |
This file contains 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
jQuery(document).ready(function($) { | |
$('.popup-gallery').magnificPopup({ | |
delegate: 'a', | |
type: 'image', | |
tLoading: 'Loading image #%curr%...', | |
mainClass: 'mfp-img-mobile', | |
gallery: { | |
enabled: true, | |
navigateByImgClick: true, | |
preload: [0,1] // Will preload 0 - before current, and 1 after the current image |