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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<? | |
/** | |
* Enqueues Google Fonts | |
* Original source: http://webdesignfromscratch.com/wordpress/using-google-web-fonts-with-wordpress-the-right-way/ | |
* @return [type] [description] | |
*/ | |
function load_fonts() { | |
wp_register_style('googleFonts', 'https://fonts.googleapis.com/css?family=Montserrat|Open+Sans'); | |
wp_enqueue_style( 'googleFonts'); | |
} |
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
<? | |
/** | |
* GTM data layer push for gravity forms contact form | |
*/ | |
/** | |
* Pushes a submission variables to the GTM dataLayer | |
* Also pushes the event label for use in GTM tracking | |
* @param Array $entry the data submitted with the form | |
* @param Array $form Form data | |
* @return null |
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
/** | |
* Hooking into MailChimp for WordPress | |
* MC4WP JS Form Events: https://mc4wp.com/kb/javascript-form-events/ | |
* Form success | |
*/ | |
(function($) { | |
$(document).ready(function() { | |
mc4wp.forms.on('748.success', function(form) { | |
//GTM Data Layer Code Goes Here | |
window.dataLayer = window.dataLayer || []; |
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 | |
/** | |
* Enqueue Typekit | |
* Original source: https://wptheming.com/2013/02/typekit-code-snippet/ | |
* @return [type] [description] | |
*/ | |
function kp_scripts() { | |
wp_enqueue_script( 'kp-typekit', '//use.typekit.net/<YOUR CODE HERE>.js', array('jquery'), '201610122', false ); | |
} | |
add_action( 'wp_enqueue_scripts', 'kp_scripts' ); |
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 | |
/** | |
* @wordpress-plugin | |
* Plugin Name: Testimonials custom post type | |
* Plugin URI: [URL HERE] | |
* Description: Testimonials custom post type | |
* Version: 1.0.0 | |
* Author: [AUTHOR HERE] | |
* Author URI: [AUTHOR URI HERE] |
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 | |
function acf_json_save_point ($path) { | |
return __DIR__.'/data/acf'; | |
} | |
function acf_json_load_point ($path) { | |
return [__DIR__.'/data/acf']; | |
} |
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 | |
/* Wherever you place this code, the ACF partials for the post will output. I tend to put it after the default content. */ | |
$tmpart = new <name of class>(); | |
$tmpart->tmpltPartials(); | |
?> |
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
<h1>Typography</h1> | |
<h2>Headings</h2> | |
<h1>This is an H1 heading</h1> | |
<h2>This is an H2 heading</h2> | |
<h3>This is an H3 heading</h3> | |
<h4>This is an H4 heading</h4> | |
<h5>This is an H5 heading</h5> | |
<h6>This is an H6 heading</h6> | |
<h2>Body text</h2> |