Station – Current page tab

<style type="text/css">
<!--
#pagenav li.page-item-179 span.left  {
 display: block;
 position: absolute;
 left: 0;
 bottom: 0;
 width: 5px;
 height: 33px;
}

#pagenav li.page-item-179 span.right  {
 display: block;
 position: absolute;
 right: 0; 
 bottom: 0;
 width: 5px;
 height: 33px;
}

#pagenav li.page-item-179 a:link, #pagenav li.page-item-179 a:visited  {
 color: #23262a;
 background: url(/wp-content/themes/thestation/styles/station1-graphics/nav_current_tile.jpg) repeat-x left bottom;
}

#pagenav li.page-item-179 span.left  {
 background: url(/wp-content/themes/thestation/styles/station1-graphics/nav_current_left.jpg) repeat-x left bottom;
}

#pagenav li.page-item-179 span.right  {
 background: url(/wp-content/themes/thestation/styles/station1-graphics/nav_current_right.jpg) repeat-x left bottom;
}
-->
</style>

Clean up WordPress Dashboard

function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

Get custom field data

<?php

//Get custom field string:

$my_field = get_post_meta($post->ID, 'myCustomFieldName', true); ?>

echo $my_field;

//Get custom field array:

$my_field = get_post_custom_values("myCustomFieldName'");

echo $my_field[0];

?>

Shorten string characters

// Limit $myString to how many characters?

$limit = 100;

if (strlen($myString) > $limit)
$myString = substr($myString, 0, strrpos(substr($myString, 0, $limit), ' ')) . '...';

echo $myString;

Get current category ID

<?php

function getCurrentCatID(){

global $wp_query;

if(is_category() || is_single()){

$cat_ID = get_query_var('cat');
}

return $cat_ID;

}

echo getCurrentCatID();

?>