Skip Navigation

[Resolved] featured image shortcode doesnt work with crop option

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 10 replies, has 3 voices.

Last updated by Shane 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#841842

I am trying to:

Crop image like this:

<div class="post_thumbnail_wrapper"> [wpv-post-featured-image size="custom" width="60" height="60" crop="true" class="img-responsive wp-post-image" id="[previous-post-id]"] </div>

Link to a page where the issue can be seen:

hidden link

I expected to see:

Cropped image or at leasts <img> tag with some params

Instead, I got:

no img tagat all:

<div class="post_thumbnail_wrapper"> hidden link" title="Родословное древо" rel="prev"> </div>

#844239

Hi, please try these tests and let me know the results.

- When nesting quotation marks, use single quotes nested inside double quotes like this:

<div class="post_thumbnail_wrapper"> <a href="[wpv-post-url id='[previous-post-id]']" title="[wpv-post-title id='[previous-post-id]']" rel="prev"> [wpv-post-featured-image size="custom" width="60" height="60" crop="true" class="img-responsive wp-post-image" id="[previous-post-id]"] </a></div>

- If that does not resolve the problem, test without the custom previous-post-id shortcode. Replace the previous-post-id shortcode with the correct previous post ID number as a test, like this:

[wpv-post-featured-image size="custom" width="60" height="60" crop="true" class="img-responsive wp-post-image" id="12345"]

Replace 12345 with the ID of the correct previous post. Is the img tag displayed in this test?

#845843

Hi Christian,

Thanks for fast reply. Unfortunately both ways nothing changed.
The same problem I have not only with previous-next-ids, but also with the current post in the loop.
But it looks like the problem not with id, but with custom size. If I remove 'size="custom" width="60" height="60" crop="true" ' and change it to 'size="150px" ' then img tag become visible just with not good size for me (150px).
Probably it should be regenerated sizes to my images? Or your plugin generate them by page request?

#847181

Go to Toolset > Settings > Custom Content tab, and check both checkboxes for resizing images. Then clear the caches, and test again. Let me know what you find out.

#847837

Thanks, done as you recommended... same results - just no img tag

#848196

Okay thanks, please try these troubleshooting steps first:
- Temporarily deactivate all plugins except Types, Views, and Layouts
- Temporarily activate a default theme like Twenty Seventeen
- Test again. If the problem is resolved, reactivate your theme and plugins one by one until the problem returns.
- If the problem was not resolved, please activate server logs to see if any errors are generated on the server. If you are not familiar with server logs, I can show you how to activate them temporarily. Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

Then add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Then test the custom size shortcode again. If any errors are generated, this will create an error_log.txt file in your site's root directory. Please send me its contents. Once that is done, you can revert the changes you made to wp-config.php.

#889449

I done as you wrote.
Nothing changes. And no "error_log.txt"

We use wpengine as a hosting - just let you know, probably some specific things with them

#894324

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kirill,

As Christian is currently on vacation, I will be handling this ticket.

Could you try regenerating the thumbnails by using this plugin below ?

https://wordpress.org/plugins/regenerate-thumbnails/

Thanks,
Shane

#899911

Yes, I done it, but it didn't help....

#901069

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kirill,

Would you mind providing me with access to the website so that I can have a look at this for you ?

The private fields will be enabled for the next response.

Thanks,
Shane

#901691

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kirill,

I'm not sure of what page I should be looking at but it doesn't seem that the layout for this page here
hidden link

Is being applied because when I delete the items from the layout the page still displays normally.

Thanks,
Shane