Skip to content

Instantly share code, notes, and snippets.

View anythinggraphic's full-sized avatar
☺️
Be the reason someone smiles today.

Kevin Donnigan anythinggraphic

☺️
Be the reason someone smiles today.
View GitHub Profile
@anythinggraphic
anythinggraphic / hideshare.js
Created August 28, 2014 18:44
Hideshare - Includes Tumblr and FontAwesome Alternatives
/*! hideshare - v0.1.0 - 2013-09-11
* https://github.com/arnonate/jQuery-FASS-Widget
* Copyright (c) 2013 Nate Arnold; Licensed MIT */
/* ========================================================================
* HIDESHARE v1.0.0
* https://github.com/arnonate/hideshare
* ========================================================================
Copyright (c) 2013 Nate Arnold
@anythinggraphic
anythinggraphic / hideshare.js
Created September 24, 2014 19:26
Hideshare - Includes Email Option
/*-----Version of hideshare modified by Patrick */
/*! hideshare - v0.1.0 - 2013-09-11
* https://github.com/arnonate/jQuery-FASS-Widget
* Copyright (c) 2013 Nate Arnold; Licensed MIT */
/* ========================================================================
* HIDESHARE v1.0.0
* https://github.com/arnonate/hideshare
* ========================================================================
Copyright (c) 2013 Nate Arnold
@anythinggraphic
anythinggraphic / functions.js
Last active August 29, 2015 14:14
AgentPress: Genesis Child Theme - Site Search With No Results Text
// Add text/html if there are no listings found
// http://anythinggraphic.net/horizontal-rule-button-in-wordpress
jQuery(function($) {
if( $('body.post-type-archive-listing #content .listing').length ) {
} else {
$('body.post-type-archive-listing .archive-description, body.post-type-archive-listing .taxonomy-description').hide();
$('body.post-type-archive-listing #content').append("<h3>No listings found</h3><p>We're sorry. We don't have properties that meet your current search requirements. Please search again using the search pull downs above or browse <a href='http://www.yourdomain.com/listings'>all our properties in South Jersey.</a></p><br>");
}
});
@anythinggraphic
anythinggraphic / markup.html
Last active August 29, 2015 14:14
Sticky Navigation and Scrolling
<!-- http://anythinggraphic.net/sticky-navigation-and-animated-scrolling/ -->
<div class="sticky">
<ul class="sticky-navigation">
<a href="#section_1">Your Title or Text Here</a>
<a href="#section_2">Your Title or Text Here</a>
<a href="#section_3">Your Title or Text Here</a>
</ul>
</div>
@anythinggraphic
anythinggraphic / no-posts-found-genesis.php
Last active August 29, 2015 14:14
Genesis: 'No Posts Found' Text String
<?php
//* Custom text for "No posts found" (Genesis Framework)
//* @link http://anythinggraphic.net/change-no-posts-text-string
add_filter(‘genesis_noposts_text’, ‘no_posts_found’);
function no_posts_found($text) {
$text = ‘<span class="if_you_want_one"’ . __(‘Your custom no posts found text goes here.’) . ‘</span>';
}
return $text;
}
@anythinggraphic
anythinggraphic / css-only-responsive-mobile-navigation.html
Last active August 29, 2015 14:14
CSS-Only Responsive Mobile Navigation - 10/4/13
<!-- http://anythinggraphic.net/responsive-mobile-navigation-techniques -->
<div class="menu-main-nav-container">
<ul class="nav-menu" id="menu-main-nav">
<li class="menu-item"><a href="#">Home</a></li>
<li class="menu-item"><a href="#">About</a></li>
<li class="menu-item"><a href="#">Services</a></li>
<li class="menu-item"><a href="#">Portfolio</a></li>
<li class="menu-item"><a href="#">Contact</a></li>
</ul>
<?php
//* Add custom styles to the Styles drop down menu in the TinyMCE Editor
//* @link http://anythinggraphic.net/custom-styles-in-wordpress-editor
function themeit_mce_buttons_2( $buttons ) {
array_unshift( $buttons, 'styleselect' );
return $buttons;
}
add_filter( 'mce_buttons_2', 'themeit_mce_buttons_2' );
function themeit_tiny_mce_before_init( $settings ) {
@anythinggraphic
anythinggraphic / functions.php
Last active April 23, 2016 18:01
Add A Horizontal Rule (HR) Button to the WordPress Editor
<?php
//* Add HR button to TinyMCE
//* @link http://anythinggraphic.net/horizontal-rule-button-in-wordpress
add_filter("mce_buttons", "ag_horizontal_rule_button");
function ag_horizontal_rule_button($buttons) {
$buttons[] = 'hr';
return $buttons;
}
<!-- We have to tell Cloudflare to ignore Typekit scripts to stop the flash of text on load (FOUT). We apply that to our scripts, but you can find out more about the data attribute here: https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode- -->
<!-- Also read http://anythinggraphic.net/fix-for-fout-while-using-typekit-and-cloudflare -->
<script data-cfasync="false" type="text/javascript" src="http://use.typekit.com/xxxxxxx.js"></script>
<script data-cfasync="false" type="text/javascript">try{Typekit.load();}catch(e){}</script>
<style type="text/css">
.wf-loading {
/* Hide the blog title and post titles while web fonts are loading */
visibility: hidden;
}
@anythinggraphic
anythinggraphic / functions.php
Created November 16, 2016 22:34 — forked from Deaner666/functions.php
Add customized 'read more' links to hand crafted excerpts
<?php
/* Add "Read More" link to hand-crafted excerpts
----------------------------------------------------------------------------------------*/
add_filter('get_the_excerpt', 'ag_manual_excerpt_read_more_link');
function ag_manual_excerpt_read_more_link($excerpt) {
$excerpt_more = '';
if (has_excerpt() && ! is_attachment() && get_post_type() == 'post') {
$excerpt_more = '&nbsp;<a href="' . get_permalink() . '">[Continue&nbsp;reading] <span class="screen-reader-text">' . get_the_title() . '</span></a>';
}