Image of all category in wordpress post

Asked

Viewed 86 times

0

I have some categories and in those categories I have images.

Let’s say I have the post1 and in that post1 have the cat1, cat2, cat3. When I enter the post in mode "single_post" is displayed only the image of cat1, however, I would like you to show the 3 images, one next to the other. This is possible?

This is the script that shows the Thumb of the category of post:

<?php the_post_thumbnail('sydney-large-thumb'); ?>
  • How you are inserting the images in the categories? the_post_thumbnail search for images attached to the table wp_postmeta, so they can’t be associated with a category but with the post. Check how the images of the categories are being saved (which function is called, or how they appear in the bank) and there you can solve.

  • Ricardo the images are being attached in the category through a plugin.. this script above is from the template itself.

  • Exact. The pattern of templates is to show the image of the post. The plugin is saving these images elsewhere in the database. (it may be a coincidence that the image of cat1 and post1 is the same). What we need to know is how the plugin does it, ai da para modificar.

  • I not inserting image in the post, there is a plugin that by default determines the images in the category, the post is without any image.

  • I’m using the plugin Category Featured Images - Extended. It finishes the image of the category, but if you have 1 category with image and you add another category also with image it makes the image exchange for the last category placed.

  • 1

    I took a quick look at the plugin code. He does not have this prediction of using more than one image - what he does is intercept the call to the database that would look for the thumbnail of the post and direct to the image of a category. A developer can change that for you, but it’s too big a scope for an answer here.

  • I understand, yet grateful for your attention.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.