Skip to content

Instantly share code, notes, and snippets.

View rustyeddy's full-sized avatar
💭
Hacking

Rusty Eddy rustyeddy

💭
Hacking
View GitHub Profile
@rustyeddy
rustyeddy / html.php
Created January 26, 2013 16:44
HTML helper functions to make life just a little bit easier.
<?php
function href($url, $anchor, $class = null)
{
$html = "<a ";
if ($class != null) {
$html .= 'class="' . $class . "' ";
}
$html .= 'href="' . $url . '"' . ">" . $anchor . "</a>";
@rustyeddy
rustyeddy / contact-info.html
Last active December 12, 2015 05:38
HTML Contact block with classes
<div class='contact-block'>
<div class='contact-block-wrap'>
<img src='http://example/logo.jpg' />
</div>
<div class='contact-block-inner contact-address'>
<p>Somewhere Road</p>
<p>My Town, CA 900001</p>
</div>
<div class='contact-block-inner contact-block-phones'>
/*
* We have a 220x220px area with 50% rounded radius, effectively
* creating a circle. We'll color the circle with a modern mellow
* cool blue with a bold white font smack in the middle.
*/
.lakepark-round
{
font-size: 36px;
font-weight: 800;
*~
diff
*.diff
patch
*.patch
error_log
foo
remove-me
@rustyeddy
rustyeddy / .emacs
Last active December 13, 2015 23:09
A new, VERY whittled down version of my .emacs file.
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
@rustyeddy
rustyeddy / display_child_pages_with_thumb.php
Last active December 14, 2015 06:39
This function will display all children of a page along with the thumbnail. I have it setup with div class that will print them in a 2 wide grid. It calls the medium size. A couple of these things should be paramatized (is that a word?). :)
function lpo_display_child_pages_with_thumbs()
{
global $wpdb;
global $post;
/*
* create a query that will locate all children of THIS page keeping
* the ORDER in specified in this page.
*/
$sql = "SELECT * FROM $wpdb->posts WHERE post_parent = " .
@rustyeddy
rustyeddy / load-custom-style-sheet.css
Created March 5, 2013 15:41
Darn, I can't remember where I stole this from. Either @bgardner or from my.studiopress.com, I think. Anyway, It's really straight forward but I use it all the time. I like to avoid mixing my style changes / additions to the theme as provided.
// Load custom style sheet
add_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' );
function custom_load_custom_style_sheet() {
wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/custom.css', array(), PARENT_THEME_VERSION );
}
@rustyeddy
rustyeddy / Copyright EC
Last active December 14, 2015 22:59
Cut-n-Paste into Genesis Simple Edits footer area for our websites.
@rustyeddy
rustyeddy / .gitignore
Created October 5, 2013 17:51
This is my .gitingore
*~
foo
\#*
data
reports
diff
*.diff
*.patch
@rustyeddy
rustyeddy / genesis-footer-banner.php
Last active December 24, 2015 20:18
Place a footer banner above the footer widgets area in the genesis theme.