Place the code below into your functions.php file to add custom user profile fields. Edit or add lines as you see fit. Remember not to remove the line: return $contactmethods; otherwise this won’t work. // CUSTOM USER PROFILE FIELDS function my_custom_userfields( $contactmethods ) { // ADD CONTACT CUSTOM FIELDS $contactmethods[‘contact_phone_office’] = ‘Office Phone’; $contactmethods[‘contact_phone_mobile’] =
Set a maximum number of post revisions to avoid DB bloat
Default is infinite, this will set it to only remember last 5 edits: /** * Set the post revisions unless the constant was set in wp-config.php */ if (!defined(‘WP_POST_REVISIONS’)) define(‘WP_POST_REVISIONS’, 5);
Add your custom post types to your sites main RSS feed by default
// ADD CUSTOM POST TYPES TO THE DEFAULT RSS FEED function custom_feed_request( $vars ) { if (isset($vars[‘feed’]) && !isset($vars[‘post_type’])) $vars[‘post_type’] = array( ‘post’, ‘site’, ‘plugin’, ‘theme’, ‘person’ ); return $vars; } add_filter( ‘request’, ‘custom_feed_request’ );
Include custom post types in the search results
// MAKE CUSTOM POST TYPES SEARCHABLE function searchAll( $query ) { if ( $query->is_search ) { $query->set( ‘post_type’, array( ‘site’, ‘plugin’, ‘theme’, ‘person’ )); } return $query; } add_filter( ‘the_search_query’, ‘searchAll’ );