Follow the steps below to set up the list view of the properties for the search results page - when the image/gallery is on the left and information is on the right.
1. add the following code to the functions.php file of your active theme in order to wrap the image/gallery and the information elements (title, description, details, buttons) into different divs:
add_filter ('mphb_sc_search_results_room_top','theme_wrap_image_sc_search_results_room_top');
function theme_wrap_image_sc_search_results_room_top(){
echo '<div class="theme-room-type-images-wrapper">';
}
add_filter ('mphb_sc_search_results_before_info','theme_wrap_info_sc_search_results_before_info');
function theme_wrap_info_sc_search_results_before_info(){
echo '</div>';
echo '<div class="theme-room-type-info-wrapper">';
}
add_filter ('mphb_sc_search_results_after_info','theme_wrap_info_sc_search_results_after_info');
function theme_wrap_info_sc_search_results_after_info(){
echo '</div>';
}
2. add the style below to Appearance > Customize > Additional CSS (or style.css file of the child theme):
@media(min-width:1024px){
.mphb_sc_search_results-wrapper .mphb-room-type {
display:flex;
flex-direction:row;
}
.mphb_sc_search_results-wrapper .mphb-room-type > div{
width:50%;
}
.mphb_sc_search_results-wrapper .mphb-room-type .theme-room-type-images-wrapper{
padding-right:1.5rem;
}
}
You may extend the style above adding your custom styles adjusting width, padding, margin or adding border etc.
Comments
0 comments
Article is closed for comments.