Support » Plugin: WordPress Popular Posts » Custom post type not showing featured image as thumbnail
Custom post type not showing featured image as thumbnail
-
Any thoughts on why this page would show “no thumbnail” images when there are featured images for those posts?
Thanks
The page I need help with: [log in to see the link]
-
Hard to say what’s going on with so little info, @azhousepro 😛
All I see is a Trending tab on your right sidebar and a list of posts there.
- Is that tab an actual WordPress sidebar?
- Are you using the WordPress Popular Posts widget there? The [wpp] shortcode? Or maybe the wpp_get_mostpopular() template tag?
- What configuration are you using with your popular posts list?
- Etc.
Edit: Oh, you mean under “Popular Players”? If so all I see right now is “Sorry, no data so far”. Please populate the list by visiting some of your player posts and let me know when you’re done so I can have a look.
-
This reply was modified 3 years ago by
Hector Cabrera.
Sorry, I guess I could have been a LOT more precise about my problem. It is the “Popular Players” section in the middle towards the bottom of the page. It was showing the “no thumbnail” image on all of the players. Now it isn’t showing any players.
I am creating that area with…
if (function_exists(‘wpp_get_mostpopular’)) {
wpp_get_mostpopular(array(
‘limit’ => 6, /* list up to 5 posts */
‘range’ => ‘last7days’,
‘order_by’ => ‘views’,
‘post_type’ => ‘person’,
‘wpp_start’ => ”,
‘wpp_end’ => ”,
‘thumbnail_width’ => 50,
‘thumbnail_height’ => 50,
‘post_html’ => ‘
<div class=”db-popular__image”>
{thumb_img}
</div>
<h5 class=”db-popular__name”>{text_title}</h5>
‘));
}Please use the
code
button to wrap your code, otherwise the forum will cripple it and your code becomes hard to read @azhousepro.It was showing the “no thumbnail” image on all of the players. Now it isn’t showing any players.
Two things:
- You’re using a caching plugin on your website, WP Super Cache to be more precise. I think your popular players list was cached exactly the moment the plugin returned “Sorry, no data so far” and the list will remain like that until the next time WP Super Cache regenerates its cache. If you plan on using a PHP function that returns a dynamic list of posts on your template you’ll either have to find a way to exclude your /people page from WP Super Cache’s cache so it remains dynamic, or you’ll need to ajaxify your Popular Players section so that it doesn’t get cached by WP Super Cache.
- Once you resolve #1 please let me know and I’ll have a look at your thumbnails.
-
This reply was modified 3 years ago by
Hector Cabrera. Reason: Reworded for clarity
Sorry about that. The page is showing real data again. It is showing me one record with featured image. No Thumbnail on the other 5. They all have featured images though.
Mike
Thanks, I can see the thumbnails now.
I suspect that the issue here is that you’re hosting your images outside the
/wp-content
directory, they’re on a subdomain (assets.azbilliards.com/wp-content
) which is not the standard WordPress location. I say “suspect” because it’s been a while since I last checked the code that generates/retrieves thumbnails and so I’d have to review it and do some testing to figure out what the problem is. Unfortunately can’t do that right now as I’m busy with work hahaha.So, first question for you @azhousepro (there might be more according to your response): how exactly did you move your images to a subdirectory in your domain? Are you using a plugin for this or some custom code? If it’s a plugin, which one (so I can install it and try it out)? If it’s some code snippet, please share it here (and remember to use the
code
button this time) so I can test it.Thanks for looking into this so quickly. I am using WP-Offload Media by Delicious Brains.
I don’t know if it helps your sleuthing, but the one thumbnail that does show up is also out at assets.azbilliards.com (Ada Lio). The ones that don’t show up are also out there.
Mike
Alright, I’ll give that plugin a go (probably sometime this weekend if the family and life in general allow me) and report back what I find.
Hey @azhousepro,
So, a bit of an update: couldn’t test the plugin. The Lite (free) version of the WP Offload Media plugin doesn’t provide an option to use a subdomain as a CDN. It seems I’d need to buy the Pro version to replicate your setup and that unfortunately is a big nope for me.
Is there anything else I can do to help you get in to debug it? If you want to take this privately, I will be happy to give you login credentials for the site.
I’ve gone back over the one post that is showing the thumbnail and compared it to one of the posts that doesn’t show a thumbnail and I can’t see anything different in their data. They both have thumbnail_id entries in postmeta that link to attachments.
Mike
One thing you can try is having the function use stock WordPress thumbnails instead of the ones WPP provides. This -I think- should provide better compatibility with WP Offload Media at the cost of not being able to change the image size dynamically (as in via parameters I mean.)
If you want to take this privately, I will be happy to give you login credentials for the site.
Unfortunately forum rules explicitly forbid -for good reasons though- asking for / offering login credentials: Forum Guidelines – The Bad Stuff.
Hector, that appears to have fixed things. Thanks so much for the help with this.
Donation coming your way.
Mike
That’s great news! Thanks for the update and for your generosity 🙂
Have a nice day!
- The topic ‘Custom post type not showing featured image as thumbnail’ is closed to new replies.