Hi,
after a theme update my custom post type layout defined with a content template has crashed, regarding the image.
The shortcode used:
[types field='story-image' size='grid_news' align='left' resize='proportional'][/types][types field='story-title'][/types]
[types field='story-description'][/types]
and I have an idea that "grid_news" image size might be changed after theme update, and Toolset displays image in its fallback size: full.
I tried to re-add that shortcode element, but I could only select the old theme image sizes...
So - like WPML does after a theme or plugin update, warns us users to re-scan their stings -, some similar should be done in Toolset...
How can I solve this problem?
(I can send you links in private)
Thanks,
Best,
V.
Hi V, it sounds like the theme you are using now does not include the custom image size "grid_news" that was included with your previous theme. Toolset only reads the custom image sizes provided by your current theme, it does not create or modify them for you. So, I think you have a few options here. Hopefully one of these will work for you:
1. Use an existing image size instead of grid_news.
2. When creating the image shortcode, choose "custom size" and enter the height and width of the image manually.
3. Add some custom code to your functions.php file that uses the add_image_size function and the image_size_names_choose hooks to add the grid_news size back. Once this image size is added, you will be able to select it when you generate your image shortcode. More information about that process is described here: https://developer.wordpress.org/reference/functions/add_image_size/
4. Revert to your old theme.
Options 2 and 3 require knowing the image dimensions you would like to use. You may have to use trial and error to figure out what the old dimensions were, or you may be able to temporarily re-enable the old theme and find them.
Option 3 requires some knowledge of PHP, but will give you the best results. If you need professional help with this code, you can contact one of our certified partner contractors. Here is the list of our contractors:
https://toolset.com/consultant/
Please let me know if I can be of further assistance with this.