Skip to content

Instantly share code, notes, and snippets.

View hellofromtonya's full-sized avatar

Tonya Mork hellofromtonya

View GitHub Profile
@hellofromtonya
hellofromtonya / functions.php
Last active August 29, 2015 14:03
Add Icon to Post Title for Genesis
add_filter('genesis_post_title_output', 'lunarwp_add_icon_to_post_title', 10, 1);
/**
* Add icon to the Post Title
*
* @since 1.0.0
*
* @param string $title Post Title HTML
* @return string Amended Post Title HTML
*/
function lunarwp_add_icon_to_post_title( $title ) {
@hellofromtonya
hellofromtonya / functions.php
Created July 2, 2014 17:42
Add custom class to Genesis .entry-header
add_filter('genesis_attr_entry-header', 'lunarwp_attributes_entry_header');
/**
* Add attributes for header entry-header element.
*
* @since 1.0.0
*
* @param array $attributes Existing attributes.
* @return array Amended attributes.
*/
function lunarwp_attributes_entry_header($attributes)
@hellofromtonya
hellofromtonya / footer.php
Created July 6, 2014 10:54
Scroll to the Top floating icon feature
@hellofromtonya
hellofromtonya / child.js
Created July 6, 2014 11:04
Scroll to the Top floating icon feature - jQuery script
/*
* JavaScript|jQuery functions
*
* Load into child namespace
*
* @category LUNARWP Core
* @package Assets
* @subpackage JS
* @since 1.0.0
* @author LUNARWP
@hellofromtonya
hellofromtonya / style.css
Created July 6, 2014 11:17
Scroll to the Top Feature - CSS styling
.scrollup {
background: url(assets/images/icon_top.png) no-repeat 0 0;
width: 40px;
height: 40px;
text-indent: -9999px;
@include opacity(0.30);
position: fixed;
@include rem(bottom, 50px);
@include rem(right, 100px);
}
@hellofromtonya
hellofromtonya / functions.php
Created July 8, 2014 08:52
Add Comment Count to Comment Title & Modify Comment Form Defaults
add_filter('genesis_title_comments', 'do_shortcode', 20 );
add_filter('genesis_title_comments', 'lunarwp_add_comment_total_to_comment_title', 10, 1);
/**
* Add the comment count to the title
*
* @since 1.0.0
*
* @param string $title
* @return string Amended comment title
*/
@hellofromtonya
hellofromtonya / functions.php
Created July 8, 2014 09:21
Add Comment Count + Additional Text to Comment Title
add_filter('genesis_title_comments', 'do_shortcode', 20 );
add_filter('genesis_title_comments', 'lunarwp_add_comment_total_to_comment_title', 10, 1);
/**
* Add the comment count to the title
*
* @since 1.0.0
*
* @param string $title
* @return string Amended comment title
*/
@hellofromtonya
hellofromtonya / post.php
Created July 8, 2014 09:23
genesis_post_info
$output .= apply_filters( 'genesis_post_info', '[post_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]' );
@hellofromtonya
hellofromtonya / general.php
Created August 9, 2014 16:09
Adds an associative array into the specific position within the original associative array
/**
* Add an associative array into any position within the
* original associative array
*
* @since 1.0.0
*
* @param array $original_array Original Associative array
* @param array $array_to_insert Associative array to insert into the
* original
* @param integer $insert_position Position (starting at index 0) to
@hellofromtonya
hellofromtonya / gist:322c7385bc1a73273d33
Last active August 29, 2015 14:05
Remove columns from WordPress Posts Listing (Admin area)
add_filter('manage_post_posts_columns' , 'lunarwp_remove_some_posts_listing_columns', 20, 1);
/**
* Remove columns from Posts Listing
*
* Uncomment the columns you want to remove
*
* @since 1.0.0
*
* @param array $columns Post Listing Columns
* @return array Returns the amended columns array