How do I completely remove all listing pictures including the option to add any pictures when creating a listing please? I just want to keep the profile photo
Please try this PHP snippet
add_filter(
'hivepress/v1/forms/listing_update',
function ($form){
unset($form['fields']['images']);
return $form;
},
1000
);
add_filter(
'hivepress/v1/templates/listing_view_page',
function( $template ) {
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'listing_images' => [
'type' => 'content',
],
],
]
);
},
1000
);
If you want to remove listing images from your website totally (I mean some images which are in the Media section in your WordPress dashboard) then please try to do it manually or with some third-party plugins
Hi Yevhen,
Thanks for the snippet. Its working but the image space still remains in the template. Here’s an example. How do I remove the blank image space.
Please try this PHP snippet
add_filter(
'hivepress/v1/templates/listing_view_block',
function( $template ) {
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'listing_image' => [
'type' => 'content',
],
],
]
);
},
1000
);
Brilliant thank you!
It’s improving website speed and it’s look like craigslist!
But it’s only disappearing images in blocks,
How to disappear and removing (hide) all images and photos in all pages, categories, subcategories, searches and listings?
Sorry, there’s no simple code snippet - this requires advanced customizations.
To start it is possible to try this CSS snippet which will remove images all listing-related images
.hp-listing--view-block .hp-listing__image, .hp-template--listing-view-page .hp-listing__images{
display: none !important;
}
In this way it is possible to hide other elements related images
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.