Skip to content

Instantly share code, notes, and snippets.

View iamcanadian1973's full-sized avatar

Kyle Rumble iamcanadian1973

View GitHub Profile
@iamcanadian1973
iamcanadian1973 / genesis-post-titles.php
Last active August 29, 2015 14:26 — forked from nairnwebdesign/genesis-post-titles.php
Changing Genesis H1 Post Titles to H2
/*
Changing Genesis H1 Post Titles to H2
*/
add_filter( 'genesis_post_title_output', 'ac_post_title_output', 15 );
function ac_post_title_output( $title )
{ if ( is_home() || is_archive() )
$title = sprintf( '<h1 class="entry-title"><a href="' . get_permalink() . '">%s</a></h1>', apply_filters( 'genesis_post_title_text',get_the_title() ) );
return $title;
@iamcanadian1973
iamcanadian1973 / jquery.scrollTo.and.highlight.anchor.js
Last active August 29, 2015 14:26 — forked from oneblackcrayon/jquery.scrollTo.and.highlight.anchor.js
When you want to highlight a navigation anchor with scrollTo
$(document).ready(function() {
$('nav.primary a').click(function(event) { // the elements you click to scroll
event.preventDefault();
var link = this; // you need this if you are using hash links on ex: a href="#link" to id="link"
$.smoothScroll({
offset: -160, // adjusts where the scroll will stop so the height of the scrolling element plus the height of the element you are scrolling to.
speed: 2000,
scrollTarget: link.hash
});
});