Forum Replies Created
-
AuthorPosts
-
spectrum_7Participant
Well, no sooner than I ask, I figure it out… I forgot to wrap the add_image_size in a function and make sure it fires after the priority that is set on the function that created the original featured image size.
// Custom cropping on Interface featured image add_action( 'interface_init', 'override_featured_image', 30 ); function override_featured_image() { add_image_size( 'featured', 670, 300, array( 'left', 'top' ) ); }
spectrum_7ParticipantHello, I am also looking for a way to make the featured images look better on post pages, basically I just need to set the cropping more specifically.
I tried your solution above by pasting the following modified code into my child theme functions.php:
// Add Interface custom image sizes add_image_size( 'featured', 670, 300, array( 'left', 'top' ) );
however a new featured image crop was not created. I thought it might only work on images uploaded after changing the setting, however new images are also not cropped.
Any suggestions how to do this? Thanks.
December 16, 2014 at 5:36 am in reply to: Can I use a custom post type featured image in the slider? #19421spectrum_7ParticipantOkay I figured it out…
I had the wrong name for my custom post type. =(. I put in the right name into the array and copied the whole function over to my functions.php file and it works great.
spectrum_7ParticipantYes it is.
Cheers
spectrum_7ParticipantOkay, thanks.
I had the priority wrong on my unhook function….
And… I was hoping there was a simpler way than adding and hooking the 800+ lines of code from interface_headercontent_details() into my functions.php.
Here’s the unhook:
`//Remove the original headercontenct_details
function remove_interface_header_details() {
remove_action( ‘interface_header’, ‘interface_headercontent_details’, 10 );
}
add_action(‘interface_header’,’remove_interface_header_details’ , 9 );//here’s the custom hook
add_action( ‘interface_header’, ‘my_interface_headercontent_details’, 10 );
function my_interface_headercontent_details() { THE FUNCTION GOES HERE }’ -
AuthorPosts