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 header_tag_analytics() { ?> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-XX"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'UA-XXXXXXXX-XX'); | |
</script> | |
// Add your Tweeder scripts Adroll scripts Facebook scripts BounceX scripts Optimizely scripts or whatever needs to be in the head |
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
// ACF field added to body class | |
// Adapted from http://krogsgard.com/2012/wordpress-body-class-post-meta/ | |
add_filter('body_class','tend_custom_field_body_class'); | |
function tend_custom_field_body_class( $classes ) { | |
global $wp_query; | |
$postid = $wp_query->post->ID; | |
if ( is_page_template('template-service-index.php') ) { |
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 | |
/** | |
* Include posts from authors in the search results where | |
* either their display name or user login matches the query string | |
* | |
* @author danielbachhuber | |
*/ | |
add_filter( 'posts_search', 'db_filter_authors_search' ); | |
function db_filter_authors_search( $posts_search ) { |