Skip to content

Instantly share code, notes, and snippets.

@melissacabral
Last active December 14, 2015 13:19
Show Gist options
  • Save melissacabral/5093044 to your computer and use it in GitHub Desktop.
Save melissacabral/5093044 to your computer and use it in GitHub Desktop.
Activate sleeping features of wordpress themes
<?php
//turn on tumblr-style post formats
add_theme_support('post-formats', array('image', 'video', 'audio', 'quote', 'gallery'));
//adds ability to have one featured image per post or page
add_theme_support('post-thumbnails');
//more robust feed links on every page
add_theme_support('automatic-feed-links');
//adds CSS to the admin text editor. create a CSS file in your theme called editor-style.css
add_editor_style();
//turn on background image uploader
add_theme_support('custom-background');
//turn on custom header uploader
$defaults = array(
'width' => 960,
'height' => 150
);
add_theme_support('custom-header', $defaults)
//add more image sizes
//(name, width, height, crop?)
add_image_size('awesome-tiny', 90, 90, true );
add_image_size('awesome-banner', 960, 150, true);
add_image_size('awesome-frontpage', 960, 330, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment