Last active
October 7, 2016 00:36
-
-
Save joel-thompson/8b6ff5206942023f88d149a4f4f42e00 to your computer and use it in GitHub Desktop.
functions.php and style.css for child themes
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 add_this_script_footer(){ ?> | |
<script> | |
// intercomSettings must already be defined at this point | |
intercomSettings.attribute1 = "value1"; | |
intercomSettings.attribute2 = "value2"; | |
Intercom('update'); | |
</script> | |
<?php } | |
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); | |
function theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} | |
add_action('wp_footer', 'add_this_script_footer'); | |
?> |
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
/* | |
Theme Name: joel-child | |
Theme URI: http://example.com/twenty-fifteen-child/ | |
Description: Child theme for adding JS | |
Author: Joel Thompson | |
Author URI: joel.com | |
Template: zoomify | |
Version: 1.0.0 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready | |
Text Domain: joel-child | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment