Featured image placeholder won't work

Posted in: Newsmag
Post count: 74

In the theme panel under “Post Settings” there an option under “Featured images” that says “Featured image placeholder” which will use some sort of placeholder image if there’s a post that doesn’t have a featured image. I’d wanted to use this feature as I have some old posts that I haven’t gotten around to updating because it would keep them from looking weird if they show up in blocks and modules through my website.

The problem I’m having is that even though I have “Featured image placeholder” turned on, it’s not given any of the posts that don’t have a featured image a placeholder image. Is there any other steps I need to do to get this to work?

Post count: 6535

Hi

Please check this link, I posted a solution here: https://forum.tagdiv.com/topic/default-image-per-category/
Thanks!

Post count: 74

I cannot, for the life of me, get these placeholder images working. I tried following the instructions you posted at that link and the placeholder image doesn’t show up as a thumbnail nor on the post’s actual page. Do I need to resize my image to every single size that the ‘td’ images are?

Post count: 6535

Hi

You need to name your images with exact same names as the ones already present in the indicated folder like here: http://screencast.com/t/2tcUoDss8kE Also you have to make the images at the exact same sizes in order to fit well on blocks and modules.

Thanks!

Post count: 74

Sheesh, what a pain… but at least I know how to do it now, thank you.

Post count: 74

I must be stupid or missing something totally obvious because I still cannot get this to work. I’ve officially gone through and replaced every single one of the td placeholder images, making sure that each image is of appropriate size, dimension, and name. Then I went in and changed the code in td_module per your instruction in that other post, and it’s still not working.

It looks like instead of my placeholder image showing up, there’s this teeny tiny little empty square in the upper-left corner of where my placeholder image should be in a sidebar module. For example:

Placeholder image won't work

And here’s what my code looks like. I tried it both as you wrote it as well as with the exact name of the files in my no-thumb folder, which means I’ve tried “3-300×160.png” and “td_300x160.png” and neither of them work.

Here's what my code looks like

I really hope you can figure out what I’m missing here because I really just don’t understand how this isn’t working. I would just say screw it and give up, but I really need these placeholder images to work.

Post count: 9544

Tip:
look at your page source, see what the “printed” image link is.

Open that link in browser, is the image actually there?

http://yoursite.iii/wp-content/themes/Newsmag/images/no-thumb/td_sizehere.png ?

If using child theme, did you replace in the child theme location as well ?

Disable any minification tools you may be running for testing.

  • This reply was modified 10 years by simchris.
Post count: 74

Here’s part of the code for one of the posts that should have a placeholder image, but doesn’t:

Image URL isn't even showing up

Correct me if I’m wrong, but it would appear that it’s not trying to load any image at all for some reason. I just don’t get it.

Also, I’m not using the child theme. I use the full Newsmag theme.

Post count: 9544

Likely best to get things back to “normal” with the default placeholder image that worked originally. And then go from there. It does work with the default placeholder image, so if you get that working then we can go from there, is my thinking.

Post count: 6535

Hi @DaneOLeary

Replace the indicated line with this one: http://screencast.com/t/xkr3gARdl
$td_temp_image_url[0] = td_global::$get_template_directory_uri . '/images/no-thumb/' . $thumbType . '.png';

If the images have the same name than it should work fine.
Let me know how it goes.
Thanks!

Post count: 74

Still not working.

Here is how the code in td_module is saved right now:

And here’s the sidebar on a post’s page where there should be a placeholder image, but isn’t:

I did clear my cache and browsing history and all that, just to make sure… I have the worst luck.

Post count: 6535

Hi

I’ve test this on my side and the placeholder images are displayed fine. Please make sure that you added the images as I did here: http://screencast.com/t/aTzF3Qhxz The most important part is to name the images exactly as they were named initially, otherwise the theme won’t recognize the path ant the image won’t be displayed.
Try this way: create a post with no featured image then display it in a block, for example block 4. Usually there should be displayed the original no-thumb image corresponding for that block. For block 4 the original image is: td_341x220.png http://screencast.com/t/iGhOdblxl Result will be like here: http://screencast.com/t/Wf7LnlFdHLWg
Now replace the td_341x220.png image with a different image but name it with the exact same name and refresh the page. Result should be like here: http://screencast.com/t/aTzF3Qhxz

Let me know how it goes.
Thanks!

Post count: 74

That’s what’s driving me nuts right now, because I went and made my placeholder image the same dimensions as each of the ones that were originally there. I went through and made sure each was named exactly as the originals were. Take a look at the no-thumb folder where they’re located, the only way you can tell I changed them just by looking in the folder is by the dates over on the side.

I’ve even double-checked the image files to make sure they’re I sized they correctly. Actually, here’s one of the images when I preview it:

This is just making my head spin.

Post count: 9544

If the image works with the default image, but not with your version, it may be that the file you’re uploading to replace the original image is malformed in some way, or that the caching is not letting go of the cached file.

You might try this
assuming the file permissions of the files you’re uploading via FTP actually have the correct CHMOD setting … perhaps try using different image editor in case file corrupt in some way …

a) get it working with default placeholder image
b) make sure the /path/to/placeholder works by loading it in web browser based on what prints on page
c) refresh all caching, etc., turn off lazy loading, make sure if using CDN image is actually in ALL places content is being loaded or being redirected from
d) if using https, make sure you have your site properly setup to ONLY load https and NOT both http and https
e) try deleting the placeholder image, not over-write; upload your image, clear all caching again, then reload page and see if new image is there
f) if not, then try using a different image editing program

sorry … might not help, just food for thought

Post count: 6535

Hi

Thanks @Chris for your feedback.

@DaneOLeary
if you still can’t manage to solve this issue please provide wp-admin and ftp accesses so we can take a closer look at this issue.

Thanks!

Post count: 74

@neotrope I’d actually tried many of the things you suggested. I used both Photoshop and iPhoto to resize images, and when I uploaded my images I’d actually deleted the previous ones first and then uploaded my images, each of which had been named what the originals had been names. I don’t believe I have any sort of lazy load turned on and I’m not using https. I’ve been cleaning my caches several times a day hoping that maybe it was already working and I’m just not seeing it.

I do appreciate all feedback, though. Apparently my coding was all correct, and @Andrei_luca was able to get it working. The only issue I’m having now is that the placeholder image shows up everywhere except on the actual post itself.

Post count: 9544

Yes, the placeholder only works for thumbnails not the “actual” post itself, as you would need to set it as a featured image, which defeats the purpose (meaning if you set a featured image with your default image, you’d get that thumb automatically…) — meaning, the placeholder image doesn’t get set into the post if you don’t put an image in the post, as that is not its purpose.

Luckily TagDiv has good support to help with weirdo stuff like this … be glad you’re not using Woo themes or something as they would just answer support ticket with ‘hire somebody, goodbye’ .. 🙂

Post count: 74

No kidding, they’ve been great with answering my questions and I know I wouldn’t get that from most others.

Post count: 6535

Hi

Unfortunately to display the placeholder image inside post content will require a bit of custom work. Basically the implementation should be similar with the one used on modules bot obviously must be adapted at post content.
We would have gladly made it for you but we are a small team and we are working very hard on the development, updates, fixes and support and time does not allow us to provide any custom services at the moment. You can always get a freelancer from sites like: http://studio.envato.com/

Thanks!

Viewing 19 posts - 1 through 19 (of 19 total)
You must be logged in to reply to this topic.