Handbook Examples: Functionality and Features

Last week we began with the code section of the handbook. This week let’s get some momentum and tackle: Core functionality and features.

Functionality and Features examples:

There is no need to use
add_theme_support( 'menus' );
because register_nav_menu() does it behind the scenes.

Use coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. defined functions when possible
So rather than using your own functions:

function my_custom_cats(){
	$categories = get_the_category();
	$catOut = '';
	$separator = ', ';
	$catOutput = '';
		foreach($categories as $category) {
			$catOutput .= '<a href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s", 'text-domain' ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator;
		$catOut = 'Categories: '.trim($catOutput, $separator);
	return $catOut;

Use a core function like the_category()