This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter out the uncategorized category from an array | |
*/ | |
function theme_slug_remove_uncategorized( $categories ) { | |
return array_filter( $categories, function( $c ) { | |
return $c->name != 'Uncategorized'; | |
} ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Retrieve a single value of a custom field | |
* | |
* A wrapper for get_post_meta to make it so the $post_id is not required. | |
* | |
* @param unknown $key string - the custom field key | |
* @param unknown $p_id int (optional) - the post ID for post to retrieve the value from, defaults to current post | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Include WP Codebird | |
* | |
* Either in functions.php file or however you prefer to include it | |
*/ | |
/* If on WordPress VIP */ | |
// Load VIP Plugins/Lib |