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
Created June 30, 2014 21:56
Full width Genesis Custom Header
//* Add support for custom header
add_theme_support( 'custom-header', array(
'width' => 1000, // width of the image
'height' => 70, // height of the image
'header-selector' => '.site-header', // sets it to the <header> element
'wp-head-callback' => 'lunarwp_modify_custom_header', // callback so we can modify the css added to the <head>
'header-text' => false,
) );
/**
@hellofromtonya
hellofromtonya / functions.php
Created July 1, 2014 02:03
Remove Page Titles from all pages in Genesis
add_filter('genesis_post_title_output', 'lunarwp_remove_page_title', 10, 1);
/**
* Remove the Page Title section from all pages
*
* @since 1.0.0
*
* @return string Page Title or empty sting (for pages)
*/
function lunarwp_remove_page_title($output)
{
@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]' );