Join our new community forum for support & discussion

Join Now

Home Support Themes ListingHive Edit Listing Page

Edit Listing Page

  • Author
    Posts
  • BrownC

    Hi ihor,

    I have 2 questions please for the listing page/landing page. Home page-> All Listings-> final listing page

    1) How can the image on the All Listings and Final Listing Pages fixed and setting a minimum resolution/size. e.g. when a vendor edits their listing, I would like the site to reject any images below the current set resolution so that they are always quality images, and when the images are uploaded I want them to all look the same size on the All Listings Page and in the Gallery on the Final Listing Page.

    2) How do I add more blocks on the right-hand section of ht final listing page?
    Currently, there is a ‘Page Primary Block” that you can add other attributes to,

    How do I create 3 more ‘Page Primary block” so that I can have one for
    – Contact
    – Location
    – Facilities/Amenities

    Thank you so much =)

    ihor developer

    Hi,

    1. This code snippet should do it:

    add_filter(
    	'wp_handle_upload_prefilter',
    	function( $file ) {
    		if ( ! is_admin() && in_array( $file['type'], [ 'image/jpeg', 'image/png' ] ) ) {
    			$size = getimagesize( $file['tmp_name'] );
    
    			if ( $size[0] < 800 || $size[1] < 600 ) {
    				$file['error'] = esc_html__( 'Images should be at least 800x600px.', 'hivepress' );
    			}
    		}
    
    		return $file;
    	}
    );

    2. Please try using existing template areas for displaying attributes, or use extensions. For example you can use Messages extension for adding the contact button (it supports sending emails without storing messages), Geolocation for locations (displays location below the listing title), and secondary area for attributes like amenties/facilities. At the moment the only way to add new attribute areas is via custom code snippets. Also you can try adding widgets to the listing sidebar in Appearance/Widgets section, but widgets will be the same for all listings.

    BrownC

    hi ihor,

    thnaks for your quick response.

    Does this snippet go into the ‘additional CSS area’ or PHP?

    ihor developer

    It’s PHP, you can use this plugin to manage snippets https://wordpress.org/plugins/code-snippets/ or generate a child theme for ListingHive and add snippets to functions.php file.

Viewing 4 posts - 1 through 4 (of 4 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.