Forum Replies Created
-
AuthorPosts
-
nkleekamp
MemberOK, I'm marking this as resolved. For posterity, add_image_size() does generate individual files if you have the proper dependencies installed. My issue was related to not having php5-imagick installed. Thanks again!
nkleekamp
MemberThanks coralseait for the reply!
I'm doing that with the Regenerate Thumbnails plugin, but I'm only seeing the original image size, along with those defined in Settings > Media. When I upload new images, I'm not seeing the sizes that I have defined in my functions file either.
Hence my question, is the add_image_sizes() function supposed to generate individual image files at the sizes defined in the functions file, or does it just add the width/height attributes to the
tag?
January 20, 2015 at 10:10 pm in reply to: Different content types on shared category archive page #138158nkleekamp
MemberI found the answer on StackExchange and expanded it with a little more info from the Codex.
For anyone else that might need it, here was my solution.
//* Include Custom Post Types in author, category, and tag archive page function __set_cpt_for_archives( &$query ) { $post_types = array( 'post', 'portfolio', 'publication' ); $archive_types = array( 'is_author', 'is_tag', 'is_category' ); foreach ( $archive_types as $key => $val ) { if ( $query->$val ) { $query->set( 'post_type', $post_types ); remove_action( 'pre_get_posts', '__set_cpt_for_archives' ); } } } add_action( 'pre_get_posts', '__set_cpt_for_archives' );
-
AuthorPosts