Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter lovefamilyholidays

    (@lovefamilyholidays)

    Thanks, this seems to have bought the text away from the edge.

    It’s still not centred, but perhaps this will do instead..

    Not sure whether this is a new thing which I missed before, but on the other accommodation listing page at https://lovefamilyholidays.co.uk/best-holiday-destinations-family-breaks/ the titles are now cut short.

    Is this something I’ve done? Before they used to continue on to a second line.

    Thanks

    Plugin Author Greg Winiarski

    (@gwin)

    1. Add following CSS to each “CLICK HERE …” link

    display: block;
        width: 100%;
        text-align: center;

    this will center them

    2. Titles display like that in order to have boxes aligned properly, this is a feature, pretty much since version 1.0.

    Thread Starter lovefamilyholidays

    (@lovefamilyholidays)

    Sorry, please could you confirm where I should add the above CSS?

    I looked at adding it to the list-item.php in the child theme, but I’m thinking it doesn’t belong here?

    Plugin Author Greg Winiarski

    (@gwin)

    This code should be in “style” attribute in your <a> tag.

    For example

    <a href="..." data-wpel-link="internal" style="display: block; width: 100%; text-align: center;">CLICK HERE FOR DETAILS</a>

    Thread Starter lovefamilyholidays

    (@lovefamilyholidays)

    Thanks Greg

    I added that, but it doesn’t seem to have altered anything.

    Is there something wrong with the way I’ve entered it?

    <div class="<?php echo adverts_css_classes( 'advert-item advert-item-col-'.(int)$columns, get_the_ID() ) ?>">
    
            <?php $image = adverts_get_main_image( get_the_ID() ) ?>
            <div class="advert-img">
                <?php if($image): ?>
                    <img src="<?php esc_attr_e($image) ?>" alt="" class="advert-item-grow" />
                <?php endif; ?>
            </div>
    
            <div class="advert-post-title">
                <span title="<?php esc_attr_e( get_the_title() ) ?>" class="advert-link"><?php the_title() ?></span>
                <a href="<?php the_permalink() ?>" title="<?php esc_attr_e( get_the_title() ) ?>" class="advert-link-wrap"></a>
    <a href="<?php the_permalink() ?> style="display: block; width: 100%; text-align: center;">CLICK HERE FOR DETAILS</a>
            </div>
    
            <div class="advert-published ">
    
                <span class="advert-item-col-1-only advert-location adverts-icon-location"><?php echo get_post_meta( get_the_ID(), "adverts_location", true ) ?></span>
    
                <?php $price = get_post_meta( get_the_ID(), "adverts_price", true ) ?>
                <?php if( $price ): ?>
                <div class="advert-price"><?php esc_html_e( adverts_price( get_post_meta( get_the_ID(), "adverts_price", true ) ) ) ?></div>
                <?php endif; ?>
            </div>
    
        </div>

    (This is within list-item.php)

    Thanks

    Sally

    Plugin Author Greg Winiarski

    (@gwin)

    Yes there is, the line

    <a href="<?php the_permalink() ?> style="display: block; width: 100%; text-align: center;">CLICK HERE FOR DETAILS</a>

    is missing a quote sign after ?> it should be

    <a href="<?php the_permalink() ?>" style="display: block; width: 100%; text-align: center;">CLICK HERE FOR DETAILS</a>
    Thread Starter lovefamilyholidays

    (@lovefamilyholidays)

    Sorted ?? Thanks!

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Remove date’ is closed to new replies.