Jetpack Portfolio Shortcode not using Underscores Components theme templates
-
I’m using the new Underscores Components Portfolio theme base. If I use the shortcode in the page it’s not using the templates that are built into the theme but if I use
[php} get_template_part( ‘components/features/portfolio/portfolio’ ); [php]The theme templates are used.
I want to change the thumbnail size of the gallery and I’d really like to use the page shortcodes rather than build it into the template. I’ve tried the code below:
[php]
//* Use different thumbnail size for Jetpack portfolio featured image
add_action(‘init’, ‘remove_then_add_image_sizesp’);function remove_then_add_image_sizesp() {
remove_image_size(‘jetpack_portfolio_thumbnail_size’);
add_image_size( ‘jetpack_portfolio_thumbnail_size’, 350, 350, TRUE);
}function new_custom_portfolio_image_size() {
return ‘jetpack_portfolio_thumbnail_size’;
}
add_filter( ‘jetpack_portfolio_thumbnail_size’, ‘new_custom_portfolio_image_size’ );
[php]
But it isn’t working to change the images generated by the shortcode and when I change the the inbuilt image sizes in the theme in functions.php my changes are only effecting the sizes of the images if I put them in using the template tags, not working if I use the shortcode.I know that this is quite a specific question – but as Automatic built both theme and plugin I thought I’d bring flag it. Someone might be able to help.
- The topic ‘Jetpack Portfolio Shortcode not using Underscores Components theme templates’ is closed to new replies.