Skip to content

Instantly share code, notes, and snippets.

<?php
//* don't copy php tag above
//* Genesis Custom header
remove_action('genesis_header', 'genesis_do_header');
remove_action('genesis_header', 'genesis_header_markup_open', 5);
remove_action('genesis_header', 'genesis_header_markup_close', 15);
add_action('genesis_header', 'custom_header');
function custom_header() { ?>
<?php
//* don't copy above php tag
//* xhtml
remove_action( 'genesis_post_title', 'genesis_do_post_title' );
//* html5
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
//* Remove home page title (XHTML Version)
<?php
//* Add top bar
add_action( 'genesis_before', 'top_bar' );
function top_bar() { ?>
<div id="top">
<div class="wrap">
<!-- insert code here -->
</div>
</div>
@michaelcarwile
michaelcarwile / css-image-replacement.css
Created October 21, 2013 19:21
CSS image text replacement
/* Originally found: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@michaelcarwile
michaelcarwile / disable_autop-functions.php
Last active December 26, 2015 22:49
Disable WordPress autop
<?php
//* Add to functions.php
//* Found here: http://www.stampede-design.com/blog/2010/12/disable-html-auto-formatting-in-wordpress/
//* Disable WordPress autop
remove_filter('the_content', 'wpautop');
@michaelcarwile
michaelcarwile / .htaccess
Created November 1, 2013 06:24
.htaccess olddomain to newdomain while keeping page in tact (i.e. old.com/page-123 to new.com/page-123)
RewriteEngine on
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
@michaelcarwile
michaelcarwile / functions.php
Last active December 27, 2015 04:59
Genesis typekit insertion
<?php
//* do not copy this tag
//* Head additions
add_action( 'wp_head', 'head_additions');
function head_additions() { ?>
<!-- insert html here -->
<?php }
@michaelcarwile
michaelcarwile / .htaccess
Created November 2, 2013 20:59
Override php upload limit via .htaccess
# change php upload filesize limit
php_value upload_max_filesize 10M
@michaelcarwile
michaelcarwile / li-height.js
Created November 5, 2013 20:31
Change the height of all list items in order to float properly with jQuery
//* Originally found: http://www.nikolakis.net/2011/07/change-the-height-of-all-list-items-to-float-properly-with-jquery/
/* example HTML
<ul class="list">
<li>some information</li>
<li>some more information</li>
<li>even more information</li>
</ul>
*/
@michaelcarwile
michaelcarwile / restart-apache
Created December 10, 2013 02:11
restart bitnami apache
sudo /opt/bitnami/ctlscript.sh restart apache