WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code / Show portrait images in property slider without crop

Show portrait images in property slider without crop

4129 views 0

By default, we use a thumb version of the original image in theme vertical and horizontal sliders to keep page size to a minimum size.

The slider image dimensions for a page with a sidebar are set to resize all images to 825×461 in the file called wpresidence/general-settings.php. Change the resize rule

add_image_size(‘listing_full_slider’ , 835, 467, true);

After this edit, you need to check old images, and you must regenerate old images based on the new size rules.

To regenerate thumbs, you can use this plugin: Force Regenerate Thumbnails plugin – https://wordpress.org/plugins/force-regenerate-thumbnails/

How to keep the original image without crop in Sliders

***not recommended because it may increase site speed

Edit the function

wpestate_property_page_load_media in libs/property_layout_functions.php and replace
$slider_size = 'listing_full_slider_1';
and
$slider_size = 'listing_full_slider';
and
$slider_size = 'property_full_map';
with
$slider_size = 'full;

 

Turn the crop off for the thumb created

From wpresidence/libs/general-settings.php

Change to:
add_image_size(‘listing_full_slider_1′, 1110, 623, false); 
Use Force Regenerate Plugin to regenerate old thumbs (new ones will be saved without crop)
Add this CSS in theme options.
.col-md-12.full_width_prop .post-carusel .item {
height: 100%;
width: auto;
}
Technical how to | Custom Code

Related Articles

  • How to Add Custom Fields to the Login, Register and Forgot Password Forms
  • Technical: Change the Schedule Tour Email Text and the Form Default Message
  • Property list filter customization
  • Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence
MLSImportWordPress IDX Plugin for MLS ListingsImport MLS listings into your WordPress website, customize your property pages, and keep your inventory updated.Start free 30-day trial →

Help Categories

  • 111 Installation & Changelog
  • 19Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 14Footer
  • 38Header
  • 2IDX & MLSImport
  • 23Maps & Location Settings
  • 50Multilingual Websites – WPEstate Translate (Included)
  • 21Pages & Page Templates
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 38Property Single Page
  • 32Search & Filtering
  • 170Technical how to | Custom Code
  • 9Technical: Actions and filters
  • 6Technical: Child Theme
  • 86Theme Options & Global Settings
  • 6Theme Translation & Localization
  • 28Third Party Plugins Compatible
  • 16WPBakery Shortcodes
  • 51WPResidence / WPEstate CRM
  • 9WPResidence Elementor Studio
  • 39WPResidence Elementor Widgets
  • 79WPResidence FAQ

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API