{"id":259,"date":"2021-05-25T08:08:59","date_gmt":"2021-05-25T08:08:59","guid":{"rendered":"https:\/\/utillz.com\/docs\/brikk\/2021\/05\/25\/how-to-change-the-listing-image-size\/"},"modified":"2021-05-25T08:08:59","modified_gmt":"2021-05-25T08:08:59","slug":"how-to-change-the-listing-image-size","status":"publish","type":"post","link":"https:\/\/utillz.com\/docs\/brikk\/how-to-change-the-listing-image-size\/","title":{"rendered":"How to change the listing box cover size"},"content":{"rendered":"<p>You can use some simple css code to change the box cover dimension on your explore page, here is an example to make a square cover size. You can change the padding value for your needs:<\/p>\n<pre>.rz-listing-image .rz-image,\r\n.rz-listing-gallery .rz-listing-gallery-item {\r\n    padding-top: 100%!important;\r\n}\r\n<\/pre>\n<h3 id=\"\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-260\" src=\"https:\/\/utillz.com\/docs\/brikk\/wp-content\/uploads\/sites\/4\/2021\/09\/Explore-\u2013-Booking-1.png\" alt=\"\" width=\"2011\" height=\"877\" srcset=\"https:\/\/utillz.com\/docs\/brikk\/wp-content\/uploads\/sites\/4\/2021\/09\/Explore-\u2013-Booking-1.png 2011w, https:\/\/utillz.com\/docs\/brikk\/wp-content\/uploads\/sites\/4\/2021\/09\/Explore-\u2013-Booking-1-300x131.png 300w, https:\/\/utillz.com\/docs\/brikk\/wp-content\/uploads\/sites\/4\/2021\/09\/Explore-\u2013-Booking-1-1024x447.png 1024w, https:\/\/utillz.com\/docs\/brikk\/wp-content\/uploads\/sites\/4\/2021\/09\/Explore-\u2013-Booking-1-768x335.png 768w, https:\/\/utillz.com\/docs\/brikk\/wp-content\/uploads\/sites\/4\/2021\/09\/Explore-\u2013-Booking-1-1536x670.png 1536w\" sizes=\"(max-width: 2011px) 100vw, 2011px\" \/><\/h3>\n<h3 id=\"change-the-image-size\">Change the image size<\/h3>\n<p>Please note that in same cases, you may need to change the image size too. The theme is using the <strong>rz_listing <\/strong>crop size. You can change this by creating your own size in your child theme, like:<\/p>\n<pre>add_image_size( 'my_custom_image_size', 800, 800, true ); \/\/ square with crop<\/pre>\n<p><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_image_size\/\" target=\"_blank\" rel=\"noopener\">Learn more about add_image_size<\/a>.<\/p>\n<p>Once you have added the custom image size, you need to use some 3rd party plugin to re-generate all your thumbnails and create the required crop sizes, you can use the plugin <a href=\"https:\/\/wordpress.org\/plugins\/regenerate-thumbnails\/\" target=\"_blank\" rel=\"noopener\">Regenerate Thumbnails<\/a> to do that.<\/p>\n<p>Then you can change your cover image size, by adding this to your child theme&#8217;s functions.php file:<\/p>\n<pre>\/\/ the filter callback function\r\nfunction my_custom_image_size_callback( $image_size ) {\r\n    return 'my_custom_image_size';\r\n}\r\nadd_filter( 'routiz\/explore\/listing\/gallery\/size', 'my_custom_image_size_callback', 10, 3 );<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can use some simple css code to change the box cover dimension on your explore page, here is an example to make a square &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/posts\/259"}],"collection":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":0,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"wp:attachment":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}