Add an image to listing page

Any suggestion to add an image in listing page?

Which theme are you using ? Because it is highly related to HivePress theme you are using.

Edit :
I guess it’s meetinghive :wink:
And it seems meetinghive does not allow that :

whereas other themes do.

For instance :

It would require a lot of editing, I am afraid, if ever possible.

/Edit.

Yes it’s MettingHive

Ok thanks

With this code I can put there one image for everything but not for single different one.

window.addEventListener('load', function () {
  document.querySelectorAll('.hp-listing--view-block').forEach(function (listing) {
    const content = listing.querySelector('.hp-listing__content');
    const title = content && content.querySelector('.hp-listing__title');

    if (content && title && !content.querySelector('.custom-image')) {
      const imgContainer = document.createElement('div');
      imgContainer.classList.add('custom-image');
      
      const img = document.createElement('img');
      img.src = 'https://www.weddinghive.it/wp-content/uploads/wedding-4-2.jpg';
      img.alt = 'Copertina fornitore';
      img.style.maxWidth = '100%';
      img.style.height = 'auto';
      img.style.display = 'block';
      img.style.marginBottom = '10px';
      img.style.borderRadius = '12px';

      imgContainer.appendChild(img);
      content.insertBefore(imgContainer, title);
    }
  });
});

Hi,

Please note that this is a UI\UX design feature, as there is a vendor profile on the left and it does not fit on the mobile view. As a workaround, we can provide a CSS snippet to show the image, but please note that this will require a custom implementation. Let me know if this works for you.

OK thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.