• Ksearch
    January 17, 2014 at 3:40 am #19090

    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.

    crerem
    January 17, 2014 at 12:57 pm #19117

    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

    Ksearch
    January 22, 2014 at 7:16 pm #19754

    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.

    Ksearch
    January 24, 2014 at 2:37 am #19844

    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.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.