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
/** | |
* Add Add Google Tag Manager script on Genesis Framework | |
* | |
* @author Anand Kumar | |
* @link http://www.blogsynthesis.com/add-google-tag-manager-to-wordpress/#genesis-framework | |
* | |
*/ | |
add_action('genesis_before', 'google_tag_manager'); | |
function google_tag_manager() { ?> |
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 // Remove this line | |
/* Blog Intro */ | |
add_action( 'genesis_before_loop', 'xgenesis_blog_intro' ); | |
function xgenesis_blog_intro() { | |
$posts_page = get_option( 'page_for_posts' ); | |
if ( !is_home() ) { | |
return; | |
} | |
$title = get_post( $posts_page )->post_title; |
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
//* Add WooCommerce support | |
add_theme_support( 'genesis-connect-woocommerce' ); |
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
// Add My Custom Functions File | |
include_once( get_stylesheet_directory() . '/custom/custom.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
<a href="#">Back to Top</a> |
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
<a class="backtotop" href="#">Back to Top</a> |
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
//* Back To Top | |
add_action('wp_footer', 'go_to_top'); | |
function go_to_top() { | |
?> | |
<script type="text/javascript"> | |
jQuery(function($) { | |
$('.backtotop').click(function() { | |
$('html, body').animate({scrollTop:0}, 'slow'); |
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 | |
/** | |
* Custom Functions | |
*/ |
NewerOlder