Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #8219


    so the articles/posts/pages show an empty square when no featured images is defined. Where can I change the code so that I display thumbnails without having to assign a featured image to each post?




    If you find out, I’d like to know too. The only ways that I can think of off-hand are to either use the the_post_thumbnail() WordPress function to pull the featured image set by WordPress, tap into the Avia framework to pull one of the Avia-assigned featured images, or create a default, fall-back image to use when there is no image.



    this is a more complex task and it’s beyond the scope of this support forum because you’d need to use preg_match and/or the attachment function to get the first image which is embedded in the post content/text. However a very popular and useful plugin is: which is easy to implement and which checks for images on several levels (attachments, then post content images, etc.).


    Actually, I figured out a fairly easy fix. I posted it on another thread. It seems to be a fairly common complaint.


    It seems like your code will just display a fallback thumbnail and it will not display content images however the solution itself is great :)


    Actually, it only displays a fallback thumbnail if there are no Avia featured images set on the post or page that comes up in the search results. If you try this link, you’ll see that the one post that actually has those images set uses the content image while the rest use the fallback. That’s because I’m still very early in the redesign process of that site. There are only a few posts there that currently have the Avia or even WordPress featured images set. There are still several thousand to go through and restyle for the new site. I’ve been putting that part off while I finish getting the navigation and shopping cart working the way I want them.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Featured image definition by category or other wpquery stuff’ is closed to new replies.