Your address will show here +12 34 56 78

Home Forums WP ESTATE – Real Estate WordPress Theme FORUM Slider images independent positioning

This topic contains 3 replies, has 1 voice, and was last updated by  Ksearch 3 years, 8 months ago.

  • Author
    Posts
  • #19090

    Ksearch

    Hi! I’m trying to assign a different position (top:XXpx) to each image inside the property slider. Do you know how can this be achieved?

    Thanks!

    K.

  • #19117

    crerem

    Hello,
    I assume you are talking about the big top slider like the one on this link: http://wpestatetheme.org/properties/2-bedrooms-3rd-avenue/

    the current image position can be controlled via css using a code similar to this one

    #pictureMap{
    top:30px;
    }

    This source of this image is changed via javascript (when a new image is displayed ) so you cannot apply different classes to each image .

    Let me know if you need more help

  • #19754

    Ksearch

    Hi crerem! I found a workaround for this. I share it here, maybe it could help someone else:
    · Type the desired “top” value in the “description” field the image I want to change its vertical position.
    · Add this line into “single-estate-propery.php”:
    $img_descrK = get_post($image_id)->post_content;
    · Add:
    style=”top:<?php print $img_descrK; ?>px”
    before “src=” in the <div id=”pictureMap”> of the GoogleMap code in “single-estate-propery.php”

    It maybe is a dirty patch, but worked for me.

    K.

  • #19844

    Ksearch

    Hi, as you probably have guessed, the solution I posted takes the value of the featured image description and applies it to all the pictures inside the slider.

    From what you told me before the pictures are loaded from javascript, “property.js” I assume. Maybe a variable like the one containing each image’s URL could be created, containing the “description” field of each picture?

    Since the image container is so wide, the default crop doesn’t work for a lot of pictures (vertical images of small rooms, for example), a graphical interface (rev slider like) would be great, but this trick could be enough by now. Would you help me please?

    Thanks!

    K.

You must be logged in to reply to this topic.