Skip to content

Instantly share code, notes, and snippets.

@ejntaylor
Last active December 27, 2015 16:19
Show Gist options
  • Save ejntaylor/7353936 to your computer and use it in GitHub Desktop.
Save ejntaylor/7353936 to your computer and use it in GitHub Desktop.
general functions snippets. - image sizes, - insert page content
// insert page content
// Inserts page content per page. Eg. insert-home.php for Home, insert-functions.php for Functions
add_action('woo_content_before','ro_insert_page');
function ro_insert_page () {
global $post;
get_template_part('assets/php/insert', $post->post_name );
};
// image sizes
// add new images sizes
function custom_image_sizes() {
add_theme_support('post-thumbnails');
add_image_size('slide-full', 1008, 665, true);
}
add_action('after_setup_theme', 'custom_image_sizes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment