Don’t get_the_permalink()

get_the_permalink() does not exist. Use get_permalink(). Note to self: Debug my own site like I would debug any other site. I have used that function an uncountable amount of times, but got confused anyway because of having get_the_title() on my brain. This tip was brought to you by the half hour of my life that …

Read more »

Get the Current Page URL

I am working on a site now where I need to use the current page URL as a condition to determine where the main menu links will lead. This function has made an easy task of it: // Get current page URL function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} …

Read more »

Komodo Snippet for Comment Banners

I like to keep my code organized and easy to read, but since I am almost always working on a tight deadline, I do not always have time to organize and comment my code as well as I would like to. Shortcuts that aid in keeping my code organized are more likely to get used …

Read more »

Customize the WordPress Login Page

I love WordPress and am personally very happy to see the WordPress logo when I log into a site, but when building sites for some clients (and on my own development site where I build sites for clients to preview), it is nice to use their own logo for the login page. It gives a …

Read more »

My Children Want You To Know

My children want you to know that being of few words does not mean being of little intelligence.

My children want you to know that being socially awkward doesn’t mean they cannot be wonderful, kind, loving and loyal friends.

My children want you to know that they stim because they need to, not because they are brats with little self-control who wish to irritate you. My children want you to know that they are not “picky”, “wussy” or “incorrigible” because they cannot tolerate certain lights, sounds, fabrics or foods. They experience the world quite differently than you do from a sensory standpoint, and they are doing their best to process and handle all of it. Think of having the volume turned up on every one of your senses at all times.

Read the rest of this article…

Display Custom Fields In & Out of The Loop

INSIDE THE LOOP: <?php if ( get_post_meta($post->ID, 'custom-field-name', true) ) : echo get_post_meta($post->ID, 'custom-field-name', true); endif; ?> OUTSIDE THE LOOP: <?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'custom-field-name', true); wp_reset_query(); ?>

Busy Bee in Baltimore

Things got off to a rough start, but I think I am starting to get used to living here. I thought I was busy in Oakland, but somehow seem to have gotten way busier here. It is wearing me out. Business has been great since I got here. Working on 2 projects now, one from …

Read more »

Rejected, Dejected, but Relatively Unaffected

Maryland State Flag

Things started off so well. We made good time to Baltimore, got here to find an awesome apartment, a great landlord, and a neighborhood that has everything you would ever want within a few block radius. What could go wrong? Glad you asked. Please, let me whine for 3 paragraphs… If I were more paranoid, …

Read more »

Alternative Routes

Karen and Lori with our map.

Long day today. Exhausted. Got a bunch of maps at AAA and K planned us yet another alternative route in case the weather is bad, which it looks like it will be. K posted the exciting details on our site: http://karenandlori.com/2011/03/19/stormy-weather/

12 More Days in Oakland

I hella heart Oakland

We are moving in 12 days and I am starting to freak out. Our house is full of boxes. Everything is different. I will miss our house terribly. We have lived here for 8 years and I have loved every minute of it. Karen is very busy seeing people before we leave. I have seen …

Read more »

Karen and Lori’s Big Adventure

We are moving in 18 days! I can hardly believe it. In honor of the occasion, I did what I do for just about every occasion and built us a website to track our drive across the country and further adventures in Baltimore. Karen and I will both be posting stories, maps, pictures, etc.

There is not much there yet, but if you’re in the neighborhood, stop by and visit us at KarenandLori.com 🙂

Numbered Search Results in WordPress

I needed to show search results in an ordered list for a project I am working on and was very surprised to discover how involved this is for paginated search results. Showing the results using a regular ordered list starts the list numbering over at 1 on each new page of results, even though the …

Read more »

Function: wp_tag_cloud

Usage: <?php wp_tag_cloud( $args ); ?> Defaults: <?php $args = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 'format' => 'flat', 'separator' => \"\n\", 'orderby' => 'name', 'order' => 'ASC', 'exclude' => null, 'include' => null, 'topic_count_text_callback' => default_topic_count_text, 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true ); ?> …

Read more »

Autism and Empathy

I watched a great video today featuring John Elder Robison that touched on the subject of Empathy and Autism. There is a popular opinion that people with autism do not have empathy. I am not sure if this true. I think I am a very empathetic person, but I am not completely sure that I …

Read more »

Genesis: Remove/Change post info/post meta

// Remove post meta remove_action('genesis_after_post_content', 'genesis_post_meta'); // Customize the post meta function add_filter('genesis_post_meta', 'post_meta_filter'); function post_meta_filter($post_meta) { if (!is_page()) { // Spaces are added to [ shortcodes ] for display. Do not include. $post_meta = 'Filed Under: [ post_categories ], Tagged: [ post_tags ]'; return $post_meta; }} // Remove the post info function remove_action('genesis_before_post_content', 'genesis_post_info'); …

Read more »

Genesis: Custom loop arguments

remove_action('genesis_loop', 'genesis_do_loop'); add_action('genesis_loop', 'custom_do_cat_loop'); function custom_do_cat_loop() { global $query_args; // any wp_query() args $args= array('orderby' => 'title', 'order' => 'ASC'); genesis_custom_loop(wp_parse_args($query_args, $args)); }

Genesis: Custom Page Template

<?php // Template Name: Template Name Here remove_action('genesis_loop', 'genesis_do_loop'); add_action('genesis_loop', 'custom_loop'); function custom_loop() { global $paged; $args = array('post_type' => 'PostType'); // any wp_query args can go here genesis_custom_loop( $args ); } genesis();

Genesis: Default Post Thumbnail

// Default post thumbnail add_filter('genesis_get_image', 'default_image_fallback', 10, 2); function default_image_fallback($output, $args) { global $post; if( $output || $args['size'] == 'full' ) return $output; $thumbnail = CHILD_URL.'/images/thumb.jpg'; switch($args['format']) { case 'html' : return '<img src="'.$thumbnail.'" class="alignleft post-image" alt="'. get_the_title($post->ID) .'" />'; break; case 'url' : return $thumbnail; break; default : return $output; break; } }