Skip to content

Instantly share code, notes, and snippets.

View 3200creative's full-sized avatar

3200 Creative 3200creative

View GitHub Profile
@3200creative
3200creative / gradient-button.css
Created September 29, 2013 14:47
Gradient button using CSS
/* view live example at http://goodies.wpengine.com/blog/gradient-buttons-using-css3/ */
.gradient-button {
color: #fff;
cursor: pointer;
background-color: #EA0738 ; /* background color for non-css3 browsers */
/* gradient */
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#FC5176), to(#EA0738));
background-image: -webkit-linear-gradient(#FC5176, #EA0738);
background-image: -moz-linear-gradient(#FC5176, #EA0738);
background-image: -o-linear-gradient(#FC5176, #EA0738);
@3200creative
3200creative / hyperlink-color-change.js
Created September 29, 2013 14:55
jQuery script to change hyperlinks site wide to one of a random array of colors.
@3200creative
3200creative / ninety-degree-rotated-div
Last active December 25, 2015 00:29
90 degree rotation of div.
.rotated-div {
/* FF Chrome Opera etc */
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
/* IE */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
@3200creative
3200creative / functions.php
Last active September 29, 2019 14:25
custom footer text for the Genesis Framework - HTML5 / Genesis 2.0
// Remove site footer.
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
// Customize site footer
add_action( 'genesis_footer', 'sp_custom_footer' );
function sp_custom_footer() {
$creds_text_start = 'Copyright '. do_shortcode( "[footer_copyright]" ).' ';
$bloginfo = get_bloginfo( $show );
$creds_text_end = 'Site Design by <a href="http://3200creative.com" title="Site Design by 3200 Creative - 3200creative.com" target="_blank">3200 Creative</a>';
@3200creative
3200creative / category-removal
Last active December 25, 2015 01:39
Exclude particular category from posts archive - WordPress
//* Hide Category from Home Archive
add_action( 'pre_get_posts', 'be_exclude_category_from_blog' );
function be_exclude_category_from_blog( $query ) {
if( $query->is_main_query() && $query->is_home() ) {
$query->set( 'cat', '-4' );
}
}
@3200creative
3200creative / remove-qpautop
Created October 12, 2013 22:48
Disable WordPress form adding paragraphs
remove_filter('the_excerpt', 'wpautop');
remove_filter('the_content', 'wpautop');
@3200creative
3200creative / gist:7469395
Created November 14, 2013 16:05
3 WordPress comment related SQL queries. unaprove all comments, delete all unapproved comments, and delete spam comments
UPDATE wp_comments SET comment_approved = '0';
DELETE from wp_comments WHERE comment_approved = '0';
DELETE FROM wp_comments WHERE comment_approved = 'spam';
@3200creative
3200creative / functions.php
Created January 13, 2014 15:39
Post Meta and Post Info customization Genesis 2.0
//* Customize the post meta function
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
function sp_post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
return $post_meta;
}}
//* Customize the post info function
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
@3200creative
3200creative / index.html
Created January 15, 2014 18:38
Google authorship sitewide. Add to head section of Genesis Theme settings.
<link rel="author" href="https://plus.google.com/u/0/#########/" />
@3200creative
3200creative / functions.php
Last active January 3, 2016 14:29
show full content for a certain category | Genesis 2.0
/* Show full content for particular category */
add_action( 'genesis_before', 'child_conditional_actions' );
function child_conditional_actions() {
if( is_category('174')) {
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
add_action( 'genesis_entry_content', 'the_content' );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action('genesis_entry_footer', 'genesis_do_post_title');
}
}